• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Wordpress

Wordpress World

  • Submit
  • Disclaimers
  • About
  • DMCA
  • Privacy Policy
  • Contact

You are here: Home / Referring to posts in multiple categories

Referring to posts in multiple categories

September 11, 2019 by

I have posts assigned to multiple categories, as in this example:

Post 1 > Cat A, Cat B

The posts are accessed via category pages, and on the posts content.php template part I would like to show the name of the category page that the post was accessed from, for example:

Post 1 > accessed from Cat A > post shows ‘Cat A’

However no matter what I’ve tried so far, the posts always show the name of the first (lowest ID number) category.

Is there a way to make the post template to dynamically show the relevant referring page/category?


  • How to Delete all WordPress Posts and Comments
  • How to Create a Custom Single Post Template (With and Without Coding)
  • Pittsburgh Anchor Got Fired for Essentially Pegging Young Black Men as Killers in Facebook Post
  • E-commerce SEO: guide on when to create and optimise new categories pages
  • E-commerce SEO: Create and optimise new category pages
  • Top 100 Blogs About WordPress and Their Most Popular Posts
  • Definitive Guide to WordPress Post/Page Navigation
  • Managing Posts with WordPress Plugin
  • I can't update my meta box with multiple fields

Filed Under: Tags posting multiple photos on instagram, posting reference, posting multiple pictures on instagram, post secondary education refers to, reference number post office, posting multiple stories on instagram, software post to multiple social networks

Primary Sidebar

RSS Recent Stories

  • Remove unwanted elements for a wp_nav_menu
  • Get_term_meta() always returns false
  • How to ask WordPress to generate XHTML?
  • Get user count based on multiple meta key values?
  • 21 Best Coffee Shop Themes for WordPress (2019)
Copyright © 2019 Wordpress. Power by Wordpress.