I have a news wordpress site.
I have a nav that shows all the categories.
The post can have multiple categories so post can be in more than one category.
When I click the nav it opens a category.php page that shows all the posts in that category.
When you click a post in the category.php it opens the post in a single.php page.
How can I get the category on the single.php where the post came from.
Example:
Post-1 can be in category Red and Blue.
If in the nav I click Red, Post-1 will be in the category.php page.
If I click Post-1 on the category.php and it opens in the single.php I want to get the category where it came from - Red
Is there a simple way to pace along the category from the category.php to single.php