WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. christinax805
    Member
    Posted 3 months 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
    Member
    Posted 3 months 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'

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.