Taxonomy Rewrite Rules Redirecting Instead of Masking
Found the solution. The rewrites were getting added to the db after the system was reading them from the db. Moved the code and it worked!
Found the solution. The rewrites were getting added to the db after the system was reading them from the db. Moved the code and it worked!
For these situations build your own metabox for the tax terms and use radio or select. My fork of Jared Atchison’s Custom Meta Box class supports custom taxonomy metaboxes. After you get the metabox directory uploaded use this to create your meta box. $prefix = ‘xxx_’; //Add your own unique prefix. $meta_boxes = array(); $meta_boxes[] … Read more
What exactly do you mean by separated? If you want multiple tags clouds you will probably need to: fetch full list of terms; split it into groups by your criteria; call wp_tag_cloud() for each group, using include argument to use specific subset of terms.
I would recommend the Search Everything plugin too, but if you want to implement this using WP’s search function, here’s the code I’m using in my Atom theme: // search all taxonomies, based on: http://projects.jesseheap.com/all-projects/wordpress-plugin-tag-search-in-wordpress-23 function atom_search_where($where){ global $wpdb; if (is_search()) $where .= “OR (t.name LIKE ‘%”.get_search_query().”%’ AND {$wpdb->posts}.post_status=”publish”)”; return $where; } function atom_search_join($join){ global … Read more
I’m answering this just so it doesn’t stay in the unanswered list. This was a core bug that has been patched in 3.3. http://core.trac.wordpress.org/ticket/18086
Switch the taxonomy.php just like you would the single.php to support specific post custom templates. This is untested code, so it may not work – but, first get the post type $post_type = get_query_var(‘post_type’); So if $post_type contains post_type=”car” then include archive-car.php like this: if ( $post_type=”car” ) get_template_part(‘archive-car’); elseif ( $post_type=”boat” ) get_template_part(‘archive-boat’); elseif … Read more
Have a look at the codex page for wp_list_categories. $args = array( ‘taxonomy’ => ‘article_topics’ ); wp_list_categories( $args ); For the taxonomy terms assigned to individual posts, get_categories also accepts a taxonomy argument.
You mention that with your first attempt you get the URL http://sitename.com/?brand=22 which is correct as you’ve used a get method, but you don’t say what code you’re using for the query. Personally I use this for my form and would agree with wdalhaj to use post instead of get <form id=”brandsearch” method=”post” action=””> <select … Read more
Add to the taxonomy registration: ‘rewrite’ => array( ‘hierarchical’ => true )
$object_id is supposed to be a post’s ID, make sure first that $post->ID would even output an ID, if not, the problem lies there.