Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7620959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T04:04:37+00:00 2026-05-31T04:04:37+00:00

I have a category navigation in the wordpress sidebar which contains two main categories

  • 0

I have a category navigation in the wordpress sidebar which contains two main categories A and B. In these categories there are subcategories like A1, A2, …

For example when main category A is selected…

|   A   |   B   |
|       --------|
| - A1          |
| - A2          |
| - A3          |

… and when B is selected:

|   A   |   B   |
|--------       |
| - B1          |
| - B2          |
| - B3          |

The problem is, that A is default (when you first visit the blog) but when a user selects an article from category B1 the postback is sent to the server and the article is displayed. But then A is selected again.

My idea was to check which post is currently displayed and switch the navigation based on this. But how can I find out which article is currently displayed when the code is in the sidebar.php and not in the wordpress loop?

Does anyone have a suggestion?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T04:04:38+00:00Added an answer on May 31, 2026 at 4:04 am

    I ended up using this plugin: http://www.screenshine.net/blog/1474_wordpress-plugin-show-active-category
    and then using jQuery to search for the item with the highlighted class, searched the parent div of it, checked if it’s A or B and based upon what it is I show A and hide B or show B and hide A.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two models : Category and Picture which refers to two tables, Categories
i have a table called category in which i have main category ids and
I have an online store with different categories in the main navigatio. Ie. Category
I have a custom category (disciplines) in my method plugin which I want to
I have a Model Category which has name:string categoryId:integer parent_id:integer the categoryId doesnt matter
we would like to know, How to create Vertical Navigation Menu in Wordpress. I
I have use following code to display category and there product on click patent
I would like to add sibling categories to layered navigation (whenever a customer is
I have 2 POCO classes like Category and Parent. In my conceptual model, I
I am attempting to build a category navigation system and so far have all

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.