Exclude specific categories from specific pages (using custom page template)

Community Forums Forums Design Tips and Tricks Exclude specific categories from specific pages (using custom page template)

This topic is: resolved

This topic contains 1 reply, has 1 voice, and was last updated by  susanlangenes 1 year, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #11498

    susanlangenes
    Participant
    Post count: 28

    I originally asked this directly in the comment’s on Brian’s tutorial here: http://www.briangardner.com/blog-page-single-category/

    But it occurred to me that I really should ask here, so here goes:

    Here’s what I’m trying to do (and what I have already done)

    1. create custom post type (‘set_list’), which is categorizable. done.
    2. create page template (why? because specific sidebar, different from all other pages) and have “set list” posts go on pages with that template – check.
    3. exclude specific categories from some of these pages. – This is the part I can’t make work.

    I couldn’t get Brian’s idea of using custom fields to work. I put query_args and cat=-xx, but nothing happened; I have no idea what else I could use as the field name or value and .org documentation seems thin. I’ve tried everything I could think of in php as well; nothing I do has any effect on the output of posts on my page template. Ultimately I ended up with a bunch of display:none (go ahead and have a giggle at that) in the CSS.

    Why wouldn’t this work with the custom page template? Or maybe the better question is, why would I simply assume this *would* work with the custom page template?

    A couple links to look at, if that helps:

    This page uses my custom page template, and I have NOT css’d the undesirable categories away.  So it shows all categories of posts in “set list” type. http://music.collagecreative.net/set-lists-for-string-duo/

    This page uses same custom template and I have css’d the offending categories away so that it only shows the category I want. http://music.collagecreative.net/set-lists-for-string-trio/

    Help?

    #11527

    susanlangenes
    Participant
    Post count: 28

    Nevermind I figured it out by more closely looking at this.  Thanks Nick!

Viewing 2 posts - 1 through 2 (of 2 total)

The topic ‘Exclude specific categories from specific pages (using custom page template)’ is closed to new replies.