Posts Category URL & Sitemaps
-
Hello,
This might be a simple question but I have been searching and Googling about this for days.. I have a question regarding Posts & Categories.
I have some post categories with country names (country A , Country B & Country C) and some posts (postsA, PostsB) with content. I would like to First have a sitemap that doesnt only show the primary category (now only PrimeCategory/Post) but shows ALL available URL’s & webpages. f.e. CategoryA/postA // CategoryB/PostA // CategoryA/PostB // CategoryB/PostB.
Secondly I used some code underneath to be able to create a dynamic title on my page in the header Category + Post Title, but same problem it only shows the Primary Category.
<?php $post_id = get_the_ID(); // or use the post id if you already have it $category_object = get_the_category($post_id); $category_name = $category_object[0]->name; echo single_post_title().' '.$category_name;Thank you in advance for any feedback.
Best Regards,
AXPIRA – Gift Delivery Shop- This topic was modified 5 years ago by .
- This topic was modified 5 years ago by .
- This topic was modified 5 years ago by . Reason: Moved to Fixing WordPress, this is not a Requests and Feedback topic
The page I need help with: [log in to see the link]
The topic ‘Posts Category URL & Sitemaps’ is closed to new replies.