Make Categories a Dropdown Menu in Media Library
Make Categories a Dropdown Menu in Media Library
Make Categories a Dropdown Menu in Media Library
There are two solutions that are a little bit smarter, that I can think of… 1. Don’t retrieve everything You don’t need all info about these posts. All you need is the count, so… You don’t have to get all fields for these posts and you don’t need to get them all… A “smarter” way … Read more
Mixed unrelated taxonomy in permalink
Show Post Count of a Category
The code you posted looks generally okay to me but as far as I know the rewrite parameter must be of type array or string, not bool: register_taxonomy( ‘type’, array(‘venue’), array( ‘label’ => ‘Types’, ‘singular_label’ => ‘Type’, ‘rewrite’ => array(‘slug’ => ‘type’, ‘hierarchical’ => true), ‘hierarchical’ => true, ) ); Probably this is of help. … Read more
Register a ‘car’ post type. Register ‘spoiler’ and ‘exhaust’ taxonomies to the ‘car’ post type. Use the Taxonomy Drill-Down plugin to create the “search” you need. The YouTube video URL could be stored as a custom field.
Just answering bit by bit here and will add any optimisations I see as I go: 1) $termsreg = get_terms(“region”,array(‘orderby’ => ‘slug’, ‘order’ => ‘ASC’)); can be run above the foreach loop. There is no need to run this however many times. 2) Are “all” your hotels that you have in your custom post type … Read more
You need to set up a custom taxonomy and then add the name of the custom tax via the “taxonomies” arg when registering the custom post type.
$term->slug Here is an example return of $term: stdClass Object ( [term_id] => 31 [name] => Architectural Items / Salvage [slug] => architectural-items-salvage [term_group] => 0 [term_taxonomy_id] => 31 [taxonomy] => dcategory Show Custom Taxonomy Slug(s)? => [parent] => 5 [count] => 10 [object_id] => 197 ) If you don’t know what’s in $term or … Read more
a) Create a custom post type and write panel for a menu item called “My Stuff.” Simple. The Codex should tell you everything you need to know. But here is another example: add_action( ‘init’, ‘wpse_17863’ ); /** * Creates a visible post type. * * Don’t forget to visit wp-admin/options-permalink.php once to refresh * the … Read more