Articles of custom taxonomy

custom post type, hide or disable the trash button in publish meta box

I have been adding a post type to my theme, how do I hide/disable the Move to trash button? Here is my code so far: $labels = array( ‘name’ => _x( ‘Inhoud’, ‘taxonomy general name’ ), ‘singular_name’ => _x( ‘Inhoud’, ‘taxonomy singular name’ ), ‘search_items’ => __( ‘Zoek Inhoud’ ), // ‘popular_items’ => __( ‘Popular […]

Custom page template for category taxonomy

I’ve registered a category taxonomy for my custom post type: function career_create_taxonomy() { register_taxonomy( ‘career-category’, ‘careers’, array( ‘label’ => __( ‘Category’ ), ‘rewrite’ => array( ‘slug’ => ‘career’ ), ‘hierarchical’ => true, ) ); } add_action( ‘init’, ‘career_create_taxonomy’ ); I wish to create a custom page template for this category. Currently my theme is defaulting […]

Permalink structure CPT with custom taxonomy fails

I’m getting quite frustrated setting up the correct URL structure for a CPT with a custom taxonomy. I have a CPT called ‘courses’ with a custom taxonomy called ‘course type’. The url structure should be: site.com/courses/course-type/course-single-post. For example: site.com/courses/science/rocket-to-the-moon/ I’ve managed to achieve that however not all URL parts are behaving as it should. site.com/courses/ […]

get_attached_media() on author page not working

I have a very annoying and simple problem. I can use get_attached_media() on a taxonomy page to get the attached media of a custom post. function author_loop() { $post = get_the_ID(); // Where the problem lies, only on author pages. get_attached_media returns nothing. $attach = get_attached_media( ‘application/pdf’, $post ); $attach = current( $attach ); $attach_url […]

Custom Taxonomy Archive BUG

I’m hoping that Its just my tired eyes missing something and a fresh pair of eyeballs might catch what I’m missing. I have a custom taxonomy with a slug of ‘residential_project_types’ that is assigned to a custom post type of residential_projects. I want to display all terms from the taxonomy, outputting the term name and […]

How to show the entries in a custom taxonomy by author?

I have a website that I’m building for people to write their own books. I have a custom taxonomy for this, labeled books. I now need a link or pull-down that contains all of the authors on the site, so that viewers can see all of the books made by each author (profiles show all […]

Displaying custom taxonomy terms active trail

I am using the following snippet in order to list the terms of a custom taxonomy term I’ve created called “type”. <?php $taxonomy = ‘type’; $tax_terms = get_terms($taxonomy); ?> <ul> <?php foreach ($tax_terms as $tax_term) { echo ‘<li>’ . ‘<a href=”‘ . esc_attr(get_term_link($tax_term, $taxonomy)) . ‘” title=”‘ . sprintf( __( “View all posts in %s” […]

Can custom taxonomies items have attached properties?

Let’s say for (a classic) example that I want to create an event custom post type, which will have assigned some specific fields/properties. One of them: location venue. Location venue, which I’m thinking should be a tag in a custom taxonomy, would have, besides the title, also an url and a pair of coordinates, for […]

how can i get posts from custom post type particular taxonomy category

I have registered custom post type Article in my template using register_post_type function. and i also having taxonomy category for this article posts. Here i want to filter the posts under particular category. using query post How can i do this Thanks in advance !

List taxonomies in a dropdown in theme's option panel

I want to show a dropdown in the option’s panel for choosing a “featured product category” which is a custom taxonomy. I do this way: register_taxonomy(“Catalogs”, array(“kmproduct”), array(“hierarchical” => true, “label” => “Catalogs”, “singular_label” => “catalog”, “rewrite” => true )); and in my theme_options.php i have: … array( “name” => “Homepage featured category”, “desc” => […]