0

I need help adding a Portfolio page to one of my main Pages. I don't know what information is needed, so I'll just throw in some of the important stuff.

Basically I have my main menu, (Welcome, About, Contact, etc.) which includes a tab called 'Work'. Under that tab, I have two pages called Portraits and Modeling. I want to somehow insert a few portfolio pages (each with a separate photo shoot) into the Modeling page. Ideally, I want it to show a one image preview and the full shoot once clicking on the image.

| improve this question | | | | |
3

You will have to add a new page template, which is a copy of the template that you already use for your pages.

Then simply add a new loop:

$portfolio_items = new WP_Query( array(
    'post_type'      => 'portfolio',
    'posts_per_page' => 5,
    // ''               => '', # Other arguments here
) );
if ( $portfolio_items->have_posts() )
{
    while ( $portfolio_items->have_posts() )
    {
        $portfolio_items->the_post();
        // Example output:
        the_thumbnail();
        the_content();
    }
    wp_reset_postdata();
}
| improve this answer | | | | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.