• Resolved Mathilde T

    (@mathilde-t)


    Hello,

    I installed this theme for my site. Finally, I don’t use sidebar.
    So I’d like to put an “items column” instead, and therefore, have 3 columns of items per page (instead of 2).

    I managed to do it on the home page (on index.php, “% 3” instead of “% 2”):

    <? php get_template_part (‘content’); ?>
    <? php if ($ i% 3 == 0) {echo ‘</ div> <div class = “post-row”>’; } $ I ++; endwhile; echo ‘</ div>’; ?>

    But I can’t do it on other pages …

    Thank you in advance (and excuse my English, I’m French!)

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    You need to create a page template to do that.
    If your page is called columns, then you need to create a file called page-columns.php and copy the content of index.php (preferably archive.php) to that file.

    Then you need to go to Settings / Permalinks and clear all cache.
    Hope this helps.

    Use this plugin to show the current template file that is being used.

    Thread Starter Mathilde T

    (@mathilde-t)

    FadingMusic thank you very much, the problem is solved!
    Actually, I just changed the “% 2” to “% 3” on archive.php and my 3 columns have appeared in my “categories pages” …
    I thought I had changed the “% 2” anywhere yet, sorry!

    Anyway, thank you again !

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Number of columns per page’ is closed to new replies.