WordPress.org

Ready to get started?Download WordPress

Forums

Frustrated with WP (1 post)

  1. armstrong1118
    Member
    Posted 6 years ago #

    I have been trying to figure out for the better part of a week now how to set up what appears to be an advanced little gig for my sidebar.

    I have many posts that each fall under at least 2 or 3 categories.

    What I want is for when you enter a post (lets say post1) on single.php from (lets say category1), the sidebar will show everything else in category 1 on the sidebar.

    That parts not too bad, this is where it gets tricky. I want it so that if someone enters post1 from category2 the single.php will now show all the items in category2.

    I have tried tons of things from $_SERVER['HTTP_REFERER'] and in_category to now creating my own function to set a value to a variable when a category page is opened.

    The variables work but when I try and use the variable in the sidebar it doesnt show.

    Anyone has any ideas I will gladly listen, cause I am almost out.

    Thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.