Support » Fixing WordPress » Creating Front end option to change no. of columns in image portfolio

  • prathambhawsar111

    (@prathambhawsar111)


    I am creating a portfolio website in which I need an frontend option to change the no. of columns in portfolio/image grid. Reference website –

    As you can see on the left hand side there are options to select the columns.

    How I can implement same in wordpress?

    • This topic was modified 4 days, 4 hours ago by James Huff. Reason: redundant link removed
    • This topic was modified 3 days, 11 hours ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Using the grid/query loop block? The column count is determined by a class attribute of the ul element. For example columns-3. You can use JavaScript to alter this attribute for the desired column count (allowed range 2-6). Doing so applies appropriate CSS for each grid element. The total element count does not get altered to fill out the last row. If you want to always have complete rows, you’d need to make a new request or get content via Ajax.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.