Portfolio Press
Change grid on homepage to 4 images per row (2 posts)

  1. christinax805
    Posted 2 years ago #

    Does anyone know how to change the grid on the homepage from being 3 images per row to 4?

    Here is an example site that used this theme that has it. http://sgrr.org/dogs/

  2. jwilbert
    Posted 2 years ago #

    I did the following to get this result:
    in 'style.css' section /* Portfolio Posts */
    - changed '#portfolio .portfolio-item:nth-of-type(3n)' to '...(4n)'
    - set the width in '#portfolio .portfolio-item' to 23.5%

    in 'content-portfolio.php':
    - changed 'if ( $count % 3 == 0 )' to 'if ( $count % 4 == 0 )' for the correct line break after 4 entries
    - you may also edit the number in 'apply_filters( 'portfoliopress_posts_per_page', '9' ) from 9 to a number which is divisible by 4

    repeated the last point in 'functions.php' in the function 'wpt_portfolio_custom_posts_per_page'

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.