If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 2 of 2
  1. #1
    Junior Member andrewreff's Avatar
    Join Date
    Sep 2010
    Member #
    Ok, so here is my issue that I am working on and trying to figure out;

    I have set up in my Wordpress theme both a category.php and a category-portfolio.php. The intention is so that anything in or falling within that category would display using the second template. There are sub-categories under portfolio that certain posts are marked as. My understanding was anything that would fall under a particular category would inherit it's parents template, however it is not and it is just referring to the category.php template.

    Any ideas or suggestions to get the sub-categories under portfolio to show up using the same template as the parent category would be using?


  3. #2
    Junior Member
    Join Date
    Oct 2010
    Member #
    1 times
    The way I do this is like:

    PHP Code:
    if ( 
    in_category('6') || in_category('3') ) {
    TEMPLATEPATH '/template.php');

    } else {
    TEMPLATEPATH '/subtemplate.php');

Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search tags for this page

how do i create a subcategory for a wordpress page


page template subcategory wordpress


wordpress show subcategories on page


wordpress template for sub category

Click on a term to search for related topics.
All times are GMT -6. The time now is 11:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2020 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: