• Situation:
    Essentially I have two sets of data using same WP database.
    1: News items (with categories and tags to sort)
    2: Portfolio items (with categories and tags to sort)

    Problem, some categories and tags are the same between news items and portfolio items. I do not want news items to show when looking/sorting (via cats and tags) posts that are portfolio items. Likewise I don’t want portfolio items to show when flipping through news items.

    Questions:
    Is it possible to have two separate streams of posts that can be separately referenced?

    OR

    Is there a way to reference a template based on the origin?
    (ex. news->packaging vs, profile->packaging)

    Thoughts so far:
    Different categories for news vs profile.
    Pros: Templates can be made specifically for a category due to template hierarchy (ex. category-27.php)
    Cons: Reduces robustness of news capabilities?
    Sorting by tags would still show all posts regardless of weather they are portfolio or news posts. (basically, problem not solved)

    I suppose one way of looking at it is that I’m trying to make two different sites showing different content using only one wp database.

    Any thoughts? I’ve been contemplating for 2 days with no good solution yet.

Viewing 1 replies (of 1 total)
  • Thread Starter rustystew

    (@rustystew)

    How about this:
    create a loop for portfolio posts wrapping them in a <div class=”port”>
    create a loop for news posts wrapping them in a <div class=”news”>

    then check for parent page
    if the page is news or a child of that then css display: none; on .port
    if the page is portfolio or a child of that then css display: none on .news

    but how does checking the parent page work exactly? Perhaps I’m misunderstanding that.

Viewing 1 replies (of 1 total)
  • The topic ‘Reference a theme based on origin’ is closed to new replies.