- This topic has 6 replies, 3 voices, and was last updated 6 months, 3 weeks ago by Tom.
June 27, 2020 at 4:00 pm #1344035Joe
Hi, when creating a post and adding category and subcategory I run into a problem. I tick the boxes for the main category and the subcategory but if I make the parent category the primary category it strips out the subcategory from the url. So instead of the url being blog/learning-to-play/post name it changes to blog/post name.June 28, 2020 at 5:34 am #1344336DavidStaffCustomer Support
what plugin is it you’re using to provide the Primary Category option ?
GP doesn’t interfere with permalinks and URL structures, so you may need to look at that plugins documentation – let me knowJune 28, 2020 at 6:16 am #1344366Joe
Below you’ll find a list of plugins on the site. I’m not sure but I don’t think any of them specifically provides a Primary Category option. I could be wrong. Do you know?
Better Search Replace
Contact Form 7
Contextual Related Posts
jQuery Pin It Button for Images
Optimize Database after Deleting Revisions
Really Simple CAPTCHA
Remove Query Strings From Static Resources
Yoast SEOJune 28, 2020 at 9:04 am #1344610DavidStaffCustomer Support
Its a feature of Yoast:
You would need to speak with their support regarding the effect it has on the permalink structure.June 28, 2020 at 9:33 am #1344643Joe
Thanks for that David. So Yoast is where the option comes from.
Reading through their page it looks like I would have to add a piece of code to my theme’s functions.php file.
So, it looks like this feature only avoids confusion if there are many options to make the primary category.
I don’t think that this will be a problem with my site, and possibly the way it is set at the moment might be OK. What do you think?
I have added an image showing how the structure looks in wordpress page editor. The subcategory is indented to the main category which is blog.June 28, 2020 at 10:44 am #1344694Joe
Sorry David. Forgot to add image.June 28, 2020 at 1:28 pm #1344793TomLead DeveloperLead Developer
I’ve very rarely had to use the primary category feature. The one place I’ve found it useful is on our documentation site (https://docs.generatepress.com). We use it to display/highlight the primary category of an article if it belongs to many.
Unless you specifically need the primary category feature for something, I would probably just ignore it 🙂
- You must be logged in to reply to this topic.