Query only a certain Tag without effecting Structure
-
I’m having trouble with the query_posts function. I want to be able to only include certain posts with tag=x on all category pages, but when I do this it ruins my category pages by removing the category itself.
What I want is when user-x is logged in he only see cat A posts tagged with x, cat B posts tagged with x etc.
What I get is only tag x on all category pages even if it doesn’t belong to that category.
Currently it is:
global $bp; $school_code = bp_get_profile_field_data('field=School Code&user_id='.bp_loggedin_user_id()); if($school_code && is_category()): query_posts('tag='.$school_code); endif;
Any thoughts on the best way to do this. I’ve tried adding a category parameter for the current category page but with no luck.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Query only a certain Tag without effecting Structure’ is closed to new replies.