Categories
CMS Mastering Development Wordpress

Custom Taxonomy correctly works on slugs with multiple words, not single term slugs

Here’s the code for my custom taxonomy. function register_taxonomy() { $label = array( ‘name’ => __( ‘Type’, ‘taxonomy general name’ ), ‘menu_name’ => __( ‘Taxonomy’ ) ); $args = array( ‘hierarchical’ => true, ‘labels’ => $label, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘query_var’ => true, ‘has_archive’ => true, ‘rewrite’ => array( ‘slug’ => ‘sections’, ‘with_front’ […]

Categories
CMS Mastering Development Wordpress

Using CPT slug within taxonomy rewrite causes 404

I have set up a CPT called ‘recipes’ and have added a custom taxonomy under this called ‘categories’. (The main purpose of this is to separate the recipe categories from the blog categories) I am having trouble getting the rewrites to work, everything I try fails unless I use a different slug to ‘recipes’. Is […]

Categories
CMS Mastering Development Wordpress

Display custom Metaboxes

I have an admin plugin where I created my own meta boxes. I need to know how do I display the meta box information on a page? When I edit the post all of the fields are populated with what I put in there, but when I post it and go to the page there […]

Categories
CMS Mastering Development Wordpress

How to get rewrited name of cusom taxonomy?

I have registered custom post taxonomy with rewrited name: register_taxonomy(‘behold_gallery-albums-subject’, ‘behold_gallery’,array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘rewrite’ => array( ‘slug’ => ‘kategorie-galerii’, ‘with_front’ => true ), ‘update_count_callback’ => ‘_update_post_term_count’, ‘query_var’ => true, )); so name of my custom taxonomy is ‘behold_gallery-albums-subject’ but is rewrited to ‘kategorie-galerii’. If I […]

Categories
CMS Mastering Development Wordpress

Use same slug base for Custom Post Type posts, and multiple taxonomy terms

I have done a lot of digging the past few days, and can come close, but not exactly what I need. I’m trying to alter a custom taxonomy/CPT permalink structure to all use the same slug base: /resources/. CPT: ‘resources’ TAX1, non-hierarchical: ‘type’ TAX2, hierarchical: ‘section’ I need the structure to look like this: /resources/ […]

Categories
CMS Mastering Development Wordpress

Correct Approach Custom Taxonomy and Categories

I have number of categories based on different basketball leagues League A, League B, League C and so on. What I’m trying to do is for each league to have a custom taxonomy for each season 2006-2007,2007-2008,2008-2009 so I can show the posts only for that season Category: League A -> Season: 2006-2007 -> Posts. […]

Categories
CMS Mastering Development Wordpress

Woocommerce style permalink structure

I was wondering how I use a custom post type written in code and make the URLs work similar to Woocommerce products. For example, I want my custom post type to work like so: /produce/ — archive of items /produce/vegetables/ — custom category archive of vegetables /produce/vegetables/carrot/ — instance of custom post type, in the […]

Categories
CMS Mastering Development Wordpress

Loco Translate: Custom Post and Custom Taxonomy Labels not translated in wp-admin menu

I am currently translating all of my plugins with loco translate. This is working fine on frontend and in all metaboxes in the backend, but not in the wp-admin menu: The red circled word should be in german but isn’t. My Custom Post Type: <?php function add_ons() { register_post_type(‘add_ons’, array( ‘labels’ => array( ‘name’ => […]

Categories
CMS Mastering Development Wordpress

Use Custom Taxonomies as menu and sidebar

Nice to come back coding. I’m working on my new projet: http://www.abraselemcasa.com.br/ There, I have custom posts ans custom taxonomies as you can see below: The fist one is no hierarquical taxonomies. And the second one is hierarquical taxonomies. When I call to show a custom post, I can get this information and show to […]

Categories
CMS Mastering Development Wordpress

Use Custom Taxonomies as menu and sidebar

Nice to come back coding. I’m working on my new projet: http://www.abraselemcasa.com.br/ There, I have custom posts ans custom taxonomies as you can see below: The fist one is no hierarquical taxonomies. And the second one is hierarquical taxonomies. When I call to show a custom post, I can get this information and show to […]