Support » Themes and Templates » Loop with posts from same category but different templates

  • Any help would be greatly appreciated.

    I am trying to setup a loop that has 5 posts from the same category but a few of the posts have sidebars, where the others don’t.

    Is this possible?

    I thought that I could create a sub-category, create a template for that and then target that sub-category and tell it to use the new template in the functions file.

    The category is homepage-content and the sub-category is sidebar. The templates are named homepage-content.php and homepage-content-sidebar.php

    I know just enough php and wordpress to be dangerous. Any direction wold be great.

    Let me know if I am not clear in my request, or if this was already covered in another post. I have been scouring through the forum and have not found a solution – of course I could have missed it.


  • The topic ‘Loop with posts from same category but different templates’ is closed to new replies.