How do I get WordPress URL rewrites into Sitemap?
How do I get WordPress URL rewrites into Sitemap?
How do I get WordPress URL rewrites into Sitemap?
The default UI view for a hierarchical custom taxonomy is a series of checkboxes. It sounds like wine taxonomies have a one-to-many relationship so you should be set. If you are registering your taxonomy using PHP add hierarchical => true to your configuration options. register_taxonomy( ‘xxx’, ‘post’, array( … **’hierarchical’ => true** , …) ); … Read more
Hi @ntechi: Here’s a function I wrote which I named the_taxonomy_dropdown() to give you what I think you are looking for. function the_taxonomy_dropdown($taxonomy) { $id = “{$taxonomy}-dropdown”; $js =<<<SCRIPT <script type=”text/javascript”> jQuery(document).ready(function($){ $(“select#{$id}”).change(function(){ window.location.href = $(this).val(); }); }); </script> SCRIPT; echo $js; $terms = get_terms($taxonomy); echo “<select name=\”{$id}\” id=\”{$id}\”>”; foreach($terms as $term) { echo ‘<option … Read more
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
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
Your solution would be to handle the requests via ajax. You’ll have to save data on the fly (based on input length or by the click of a button).
I’ve run into this issues too, two time, two differents errors, first time I just go to permalink structure in the wordpress options and hit save, that was a problem witht my htaccess files, and the second time it was the way I register the slug, Here is a complete working exemple : /* Post … Read more
They are all in your {wpdb->prefix}_terms table and therefore need to be unique. Else you could only get them via ID.
I would use get_queried_object() (see this post) rather than $wp_query->query_vars Also you should use $term->slug (and $category->slug) instead of $term->name. Apart from that, your method is as good as any.
Simply use taxonomy-{taxonomy}.php. Refer to the Template Hierarchy Codex entry regarding taxonomies. WordPress will look for taxonomy template files in the following order: taxonomy-{taxonomy}-{term}.php – If the taxonomy were sometax, and taxonomy’s slug were someterm WordPress would look for taxonomy-sometax-someterm.php. taxonomy-{taxonomy}.php – If the taxonomy were sometax, WordPress would look for taxonomy-sometax.php taxonomy.php archive.php index.php … Read more