Articles of categories

Allow duplicate permalink slugs for posts in different categories

I have my permalink format set to /%category%/%postname%/ and I have two posts with the same permalink slug, but in different categories. Ideally, the two permalinks should look like this: But when I publish the second post, then its slug is changed to post-title-2, which makes the resulting URL How can I […]

How can I get an <h2> tag to wrap each ancestor that gets outputted in this condition?

I found this snippet in a different thread and it mostly does what I need, but I’m having trouble wrapping the individual pages this outputs with tags. All I can seem to add is a line break. I don’t have a lot of experience with php so unfortunately I wasn’t able to customize it to […]

Restrict access and display for categories

Is it possible to choose specific categories that will only be displayed to logged in members? I tried to find a plugin or a PHP solution that does that but could not find anything that was still relevant.

Include custom post types in categories widget

So I got a fairly simple setup, one CPT with the default category and post_tag as taxonomies. Say I have 1 post and 1 CPT entry assigned to the same category. I need this to be reflected inside the category widget as well. I’ve managed to display both of them on the category page via […]

Multiple post categories – single permalink

I created a post which is assigned to multiple categories. Eg: I have a post “My Post”, and I put it in “foo” and “bar” categories. Now my article will have two permalinks, “/foo/my-post” and “/bar/my-post“. Google calls this a duplicate, which it considers to be spam, hence this is not what I want. How […]

Category vs Tag vs Table

I have a site that will hold roughly 1000 posts/articles from an in-house magazine dealing with Australian naval history. The articles cover a range of subjects (such as Aviation, Intelligence, Ship Histories, Personal Histories and the like) and I’ve created categories to suit. The names of ships in an article is very important for research […]

How Can You Exclude Categories From Your RSS Feeds?

I’ve searched and found posts that have asked and answered how to merge different categories into an RSS feed. What I need to know is how to exclude specific categories from the RSS feed? Specifically, I use WP to post blog articles and to post portfolio items onto my site. I want to exclude the […]

Is there a way to have duplicate category slugs?

WordPress sometimes is plain limiting, and some of its logics I just don’t get… For example if I have two parent directories: parent1 parent2 with subcategories: parent1 sub parent2 sub I cannot have sub sub as slug or name… WordPress automatically appends what it thinks is best like sub-1 or sub-parent2. This is not very […]

How to prevent empty category to list content of sub categories?

I have a category structure like following: A ->B ->C D (B is sub category of A and C is sub category of B) I have content only for category “C” and if I open Category “B” the content of category “C” is displayed. How can I prevent this? I want to display “No Posts” […]

Help with multiple dropdown tags search

I’m trying to build a search form that allows the user to choose certain post tags and filter through real estate listings. So far I have the form built but when I click the search button it brings me to the home page of the site. The url of the site then changes to the […]