Articles of custom taxonomy

WordPress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options

How do I modify the Settings > Permalinks (options-permalink.php) admin page to add more custom permalink parameters? I’d like to add additional permalink parameters to the “Optional” section for custom taxonomies that I’ve created. Specifically, I’d like to add more base prefix options for the Custom Taxonomies that I created. The custom taxonomies are named […]

How add body_class from wp_termmeta

I need to assign a class to the body for woocommerce categories. What I’ve done: // add the fields when the term is created add_action( ‘product_cat_add_form_fields’, ‘add_product_cat_class_field’, 10, 2 ); function add_product_cat_class_field($taxonomy) { global $feature_groups; ?><div class=”form-field term-group”> <label for=”feature-group”><?php _e(‘Custom CSS Class’, ‘my_plugin’); ?></label> <input type=”text” class=”postform” id=”custom-class” name=”custom-class” value=””> </select> </div><?php } // […]

How do I make multiple dependent input fields that use the jquery autocomplete function?

I’m trying to create a form that will allow the user to add a new listing on the front side of my equipment classifieds website. I have a custom post type set up with a custom taxonomy called listing_taxonomy. The taxonomy is hierarchical and is rather deep. I want to display 4 dropdown input fields […]

How to get CPT category checkbox list and show post of selected(multiply) checkboxes via ajax?

I want to create a plugin that outputs Custom Post Type category checkbox list(as in back-end WordPress) to show CPT posts that contain selected on front-end categories(multiply select) after pressing a button with ajax(without reloading). I took plugin Getting the random post & URL via ajax and modify it, but something is wrong. In this […]

Get template part with CPT and Custom Taxonomy conditionals

I have two Custom Post Types Video and Gallery and a Custom Taxonomy Status with the term Featured. Right now I’m showing these CPT in my index.php, but I want to style each of them, so I’m using get_template_part to achieve it. The problem comes when I want to get templates for an specific term […]

Count of posts by different parameters?

I need to get the count of posts (just a number, nothing else) by custom taxonomy AND post meta(string) but I can’t find a good way to combine them both. Im fairly new to programming & WP, Im not sure where to start from.

Get template part using a custom taxonomy term

I’ve been using the following code to get a template part based on the parent term. It was working fine until I updated WordPress to v4.4 earlier today. Since updating if there is also a child term selected it no longer works to bring in the template part. Any ideas? I’m tearing my hair out. […]

Meta query for a custom taxonomy on attachment

I have a custom taxonomy “length” with 3 values [‘long’, ‘medium’, ‘short’] I have attached this taxonomy to attachments (using CPT UI) Upon viewing the taxonomy I can see that I have successfully added ‘long’ to an image as it shows “count = 1” However my query is returning no records. Array ( [post_type] => […]

Custom rewrite permalink doesn't work

function create_posttype() { register_post_type( ‘events’, array( ‘labels’ => array( ‘name’ => __( ‘Events’ ), ‘singular_name’ => __( ‘Event’ ) ), ‘public’ => true, ‘has_archive’ => true, ‘rewrite’ => array(‘slug’ => ‘%city%/events’), ) ); } add_action( ‘init’, ‘create_posttype’ ); register_taxonomy(‘cities’, array(‘events’), array( ‘hierarchical’ => true, ‘labels’ => $labels, ‘show_ui’ => true, ‘show_admin_column’ => true, ‘query_var’ => […]

Ideas on how to organize a project

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 […]