Exec Portfolio

Community Forums Forums Showcase and Feedback Exec Portfolio

This topic contains 2 replies, has 2 voices, and was last updated by  mrhutts 1 year, 9 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30438

    mrhutts
    Participant
    Post count: 3

    Hello

    The portfolio page is limited to 12 portfolio posts – how do I change how many post show on the portfolio page? (I would like 40 to show on the portfolio page)

    http://aboutsharks.info/portfolio/

    thanks in advance

     

    #30496

    Charlie
    Participant
    Post count: 112

    In your functions.php you’ll find this code:
    [php]
    /** Change the number of portfolio items to be displayed (props Bill Erickson) */
    add_action( ‘pre_get_posts’, ‘executive_portfolio_items’ );
    function executive_portfolio_items( $query ) {

    if( $query->is_main_query() && !is_admin() && is_post_type_archive( ‘portfolio’ ) ) {
    $query->set( ‘posts_per_page’, ’12’ );
    }

    }[/php]

    Try changing 12 to 40. NB: I haven’t attempted this myself, but it’s where I’d start.

    #30539

    mrhutts
    Participant
    Post count: 3

    Hi Charles,

    Genius, it worked!!

    Many thanks for your help.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.