« See all FAQs for 7 in 1 Business Success Wordpress Theme

How Can I Setup Multiple Portfolio Pages/Sections?

The Business Success theme for WordPress is setup by default to have only one Portfolio Section with many subcategories as seen in the demo. However, it is possible to setup the theme to support more than one Portfolio pages but it will require a little modification of the code. Please follow the instructions below closely.

First structure your multiple Portfolio Categories from the WP backend Posts—> Categories in the following fashion, use your own names for Categories of course, this is just an example:

Portfolio 1 (Take note of this category ID, which is the parent category)
- Category 1 (those are actually sub-categories or children categories to Portfolio 1)
- Category 2
- Category 3

Portfolio 2 (Take note of this category ID, which is the parent category)
- Category 1 (those are actually sub-categories or children categories to Portfolio 2)
- Category 2
- Category 3

You would need to match now a page with a portfolio. By ‘page’ here, I mean the page(s) that you assigned the Portfolio page Template to.

To continue now you’ll need to change 3 lines of code in the ‘page-Portfolio.php’ file around line # 12:

BEFORE:
$portfolio_cat_ID = $b_success_options['portfolio_cat'];// Get the portfolio category you specified in the 'B. Success Options' page
AFTER:
if ( $page_id == 197 ) {  //put the page ID that you assigned the portfolio template to (replace 197 with your page ID)
    $portfolio_cat_ID = 18;  // Put your new category ID that will be matched with the page id in the if statement (replace 18 with your cat. ID)
} else {
    $portfolio_cat_ID = $b_success_options['portfolio_cat'];// Portfolio category specified by you in the 'B. Success Options' page (the default Portfolio)
}

you see, if you use this approach, you could have multiple if-else statements and have this work for many Portfolio pages, for more than 2 Portfolio page use ‘elseif (..)’ like:

if ( $page_id == ... ) { 
    ...
} elseif ( $page_id == ... ) { 
    ...
} elseif ( $page_id == ... ) { 
    ...
} elseif ( $page_id == ... ) { 
    ...
} else {
    ...
}
by
by
by
by
by
by