Articles of custom taxonomy

Custom post type and taxonomy cross registration

This question already has an answer here: What's the purpose of 'taxonomies' parameter in register_post_type()? 1 answer

How to create a template to show child terms of a MAIN taxonomy

I’ve registered a custom post type called video, like so: add_action( ‘init’, ‘create_post_type’ ); function create_post_type() { // Videos Post-Type $labels = array( ‘name’ => _x( ‘الحلقات/الأفلام’, ‘post type general name’, ‘qtoon’ ), ‘singular_name’ => _x( ‘حلقة/فيلم’, ‘post type singular name’, ‘qtoon’ ), ‘menu_name’ => _x( ‘حلقات/الأفلام’, ‘admin menu’, ‘qtoon’ ), ‘name_admin_bar’ => _x( ‘حلقة/فيلم’, […]

Create a a form for custom taxonomy terms

Currently i am displaying a list of my custom taxonomy (contenttags). These are displayed in a list using the code below, which then displays the posts under that taxonomy. <?php $taxonomy = ‘contenttags’; $terms = get_terms($taxonomy); // Get all terms of a taxonomy if ( $terms && !is_wp_error( $terms ) ) : ?> <ul> <?php […]

How to set an alternate posts_per_page value for default queries in different templates

I have a WP site with multiple post types. Posts, products w/taxonomies. I have my WP Default posts_per_page setting at 10 in the admin. I want to keep this setting as the blog would be best at 10 per page. However on a page/template like taxonomyNAme-archive.php I want to get many more than 10. But […]

Insert terms for custom taxonomy on plugin activation, or each page load (init hook)

Consider a plugin which adds a custom Taxonomy and then fills the taxonomy with a large term hierarchy (tens of hierarchical terms, may become hundreds in specific installations). I understand that register_taxonomy() does not store data in the database, therefore it must be used via the init hook so that the taxonomy is registered on […]

Urls in Custom Post Type work for Terms but not for its Taxonomies

I have created 12 taxonomies for a custom post type and a few terms. On creating new post it looks like this and that is perfect – Taxonomies with terms I have: archive page – url is sitename/kalendar – working ok single page – url is sitename/kalendar/title – working ok taxonomy page – url should […]

query_posts by category_name and custom taxonomy

I want to display posts filtered by category_name and custom taxonomy-term: I have function channel_init() { // create a new taxonomy register_taxonomy( ‘channel’, ‘post’, array( ‘label’ => __( ‘Channel’ ), ‘rewrite’ => array( ‘slug’ => ‘channel’ ), ‘hierarchical’ => true, ‘capabilities’ => array( ‘manage__terms’ => ‘edit_posts’, ‘edit_terms’ => ‘manage_categories’, ‘delete_terms’ => ‘manage_categories’, ‘assign_terms’ => ‘edit_posts’ […]

Hide custom taxonomy from easy admin

I’m running a website that uses EasyAdmin (for user content generation). I created two taxonomies (via functions.php) for my own needs, but now my users can see them when they are adding their content to the website. add_action( ‘init’, ‘create_item_nominations’ ); function create_item_nominations() { register_taxonomy( ‘nominations’, ‘ait-dir-item’, array( ‘label’ => __( ‘Nominations’ ), ‘rewrite’ => […]

How do I hide certain taxonomy boxes from users in admin add post page?

I would like to hide this particular taxonomy box in the admin on the add new post page.

Also show terms that are related to draft and pending posts

Im using wp_dropdown_categories to output terms in dropdown menu but it only shows terms that are related to published posts. I wonder if there’s a way / hack to include terms that are related to pending and draft posts? Codex doesn’t say anything about that, also searching the web didn’t give any results.