taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
You can use the relations field from ACF. Then you could select your own related posts for each blog item.
Found it out! I needed to put the registered taxonomy to the same post type in the registered_taxonomy() function.
The way to go would be to create an archive template for your taxonomy. Then you can catch the term requested with a function like get_queried_object(). So now you can do a custom WP_Query querying for both your term and your meta ‘featured’ Hope that makes sense http://codex.wordpress.org/Class_Reference/WP_Query http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display
You did not specify a taxonomy term in tax_query. It should go: ‘tax_query’ => array( array( ‘taxonomy’ => ‘taxonomy_name’, // my guess ‘field’ => ‘name’, ‘term’ => ‘Term name’ ), ), I prefer using ‘field’=>’slug’ in such cases as term names are more likely to be changed. And also change order by ‘title’ to ‘post_title’as … Read more
Use wp_get_object_terms function to get any taxonomy you want, category, tag, state, etc. For example: $terms = wp_get_object_terms(get_the_ID(), ‘state’); $state = array_pop($terms); echo $state->name; This function is returning array of terms, so in case you only have one state, it will return array of one item in it.
Change order custom taxonomy
Add image to taxonomy and output to homepage
To show a page at the custom post type ‘home’ you need to create a regular page with that slug. You can then add the page to the menu. I think I saw this in a different answer somewhere, but can’t find it right now.
I used: $args = array( … ‘rewrite’ => array( ‘slug’ => ‘portfolio-taxonomies’ ), … ); register_taxonomy( ‘portfolio_taxonomies’, array(‘portfolio’), $args ); So my URL is predictable. And you did one thing wrong, URL you are putting is NOT correct. If the rewrite rule is implemented, then they would be: http://localhost/wp-test/portfolio-taxonomies/taxtemp1/ http://localhost/wp-test/portfolio-taxonomies/taxtemp2/ To grab the correct URL, … Read more