Articles of the taxonomies

How to get posts by category and by choosing a taxonomy term?

I’m new to WordPress and I’ve managed to build most of a full custom theme for wordpress on my own. But the tricky stuff is starting to show its tail, and I’ve spent the last days stuck on Taxonomies. I just managed to put a code for registering a custom Taxonomy to sort my articles […]

Rewrite rules priority

I’m created URL rules for my theme but some rules not applied in the correct order.. For example: (1) This rule (with only one taxonomy) works fine: /from/(.+?)/?$ => ‘index.php?post_type=custom&from=’ . $wp_rewrite->preg_index(1) (2) And this another rule, with two or more taxonomies, not working because, the first rule (1) apparently it has higher priority or […]

Update permalinks when new category added to custom post type taxonomy

Note: this question also appears on https://stackoverflow.com/questions/44060613/update-permalinks-when-new-category-added-to-custom-post-type-taxonomy (but is not getting much love). Have created a collection of Custom Post Types (CPT) for a WordPress theme I am working on (along with their own taxonomies and tags). For the purpose of this question I will just focus on the ‘projects’ CPT. When a new project […]

outputting posts' taxonomies: cant get 'get_the_taxonomies' working

I want to output the taxonomies associated with a post in a ‘title’ attribute, so it needs to be unformatted. I know about get_terms and get_terms_list, but the problem is that you need to provide which taxonomy you want to get on forehand. But what if you have an archive page which lists multiple different […]

Why does wp_get_object_terms add a period after terms are output?

I’m using the following line to output an unordered list of taxonomies and their associated terms for a custom post type. The only problem with it is that a period gets added after the term. wp_get_object_terms( $id, the_taxonomies( ‘before=<ul><li>&sep=</li><li>&after=</li></ul>’ ) ); Here’s what it outputs: <ul><li>Taxname: <a href=’http://site.com/taxname/taxterm/’>Taxterm</a>.</li></ul> Is there an argument I can add […]

Organize WordPress site, so it can maintain with huge database

Intro: Hello, I am making coupon website and I need an advise. So, the structure at the moment is like this: Coupons ( posts ) Categories of coupons ( categories ) Shops ( tags ) In the near future my database will consist of approximately ~5000 shops ( tags ) and ~20000 coupons ( posts […]

Set a CPT slug as a base name for all the taxonomies

I’m looking for help because I tried to look on the web for a solution but I can’t to solve my 404 page issue. I’m bulding a custom WordPress plugin for my photo club. This plugin wants to display portfolio for each members. Picture are classified by : Author (photographer) Color Theme (the category) I […]

Show category ID on custom post type

I have a clients who’s using the WPCasa theme. The theme has a Custom Post Type named properties and has categories on it (for rent, for sale, etc.). My client wants to show the category of the property on it’s title (i.e. “For rent – House on Miami Beach”). However, I’m not being able to […]

get_post_terms not working as expected

I have a custom post type called “Fruit” and under this I have a hierarchical taxonomy called, “Fruit Categories” When I create a new post under Fruit, I am able to assign it to a “term” – like you would with a normal post category, but under the Fruit Categories taxonomy. I’ve added three posts […]

Can I generate then display a mixed list of linked and unlinked terms

Does anyone know a straightforward way to display a mixed list of linked and unlinked (custom) terms, dependent on whether there is more than one instance of a term being used? i.e. I have an item that may have three or four terms within a taxonomy. Of these terms, two or three may have also […]