I have next code and i cant get it to list only the subcategories of a category and not sub-subcategories of the category. I think the problem is the next line ‘hierarchical’ => 0, Do you know what can be the problem or what should i add in the next code to fix for what […]
I have hierarchical taxonomy called “Location” e.g. mywebsite.com/location/state/city I want mywebsite.com/location/state and mywebsite.com/location/state/city to have different title tag I want them to be … mywebsite.com/location/state = Welcome to “state” location mywebsite.com/location/state/city = Welcome to “state”, “city” location Same thing for meta descriptions. I tried configuring header.php but no luck.
I am trying to use this code: <?php if(count(get_post_ancestors($post->ID)) == 2 ) : ?> <script>…</script> <?php endif ?> to add a script to a page but only if the page is a grandchild page (3rd level down, when it has 2 ancestors): Desired Result (with code above): Parent Page Child Page Grandchild Page (show script […]
I created a product catalog from custom post type pages. I used it’s hierarchy to make menus and submenus. It looked like a great idea at a time… But now this catalog grew in size and it’s very hard to find something in ‘Parent’ dropdown. Is there a way to add search there?
I know that questions that are mainly there to be discussed are not liked very much, but I still hope that you can think with me and give me some ideas. So thanks in advance to those of you, who are willing to help 🙂 I’m very new in WordPress Development and I am facing […]
I have a custom taxonomy (editions) and would like to have a year / month hierarchy in the taxonomy reflected in the URL structure. /editions/2016/december /editions/2017/december /editions/2018/december WordPress doesn’t seem to allow me to create this on the admin side. Is this possible? For reference, here is my custom taxonomy setup inside of my functions.php: […]
I have a hierarchical Custom Post Type called project, registered as follows: register_post_type( ‘project’, array( ‘public’ => true, ‘hierarchical’ => true, ‘rewrite’ => array( ‘with_front’ => false ) ) ); The URLs currently look like this: https://example.com/project/hello https://example.com/project/hello/world I would like the URLs to look like this: https://example.com/hello https://example.com/hello/world How can I most efficiently accomplish […]
There is the following hierarchical taxonomy structure of a specific post: Term A SubTerm A.1 SubTerm A.2 SubTerm A.2.1 Term B SubTerm B.1 SubTerm B.1.1 SubTerm B.1.2 How to display all parent terms (result: A, B) all second level terms (result: A.1, A.2, B.1) all third level terms (result: A.2.1, B.1.1, B.1.2)
I’m migrating about 500 posts (WooCommerce products, actually) to a new Custom Post type (using Convert Post Types plugin) and want to also migrate the Categories. There are the Taxonomy Converter plugin which migrates the categories themselves, but not their hierarchies, though it says it will. There’s also simply running: UPDATE wp_term_taxonomy SET taxonomy=’project-category’ WHERE […]
I have a cpt of Accommodation Taxonomy of Region Regions are then added like USA, Canada etc Then for the posts: I create a post for a whatever Resort and a child posts of whatever Hotel in that resort ( Hierarchical ) and assign it to a tax term like USA All good and working […]