I want to display my custom post type arranged by taxonomy

That’s because you’re echoing the Parent term name outside of the loop. $custom_terms = get_terms(‘material_category’); foreach($custom_terms as $custom_term) { $args = array(‘post_type’ => ‘materials’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘material_category’, ‘field’ => ‘slug’, ‘terms’ => array(‘general-english’) ), ), ); $loop = new WP_Query($args); if ($loop->have_posts()) { while ($loop->have_posts()) : $loop->the_post(); echo ‘<h2>’ . $custom_term->name … Read more

How do I display post count of a custom post type with custom category taxonomy in wp_menu_nav?

Here is your solution- add_filter( ‘wp_setup_nav_menu_item’,’the_dramatist_item_setup’ ); function the_dramatist_item_setup($item) { if (‘taxonomy’ === $item->type) { $posts = get_posts( array( ‘post_type’ => ‘post’, ‘numberposts’ => -1, ‘tax_query’ => array( array( ‘taxonomy’ => ‘category’, ‘field’ => ‘id’, ‘terms’ => $item->object_id, // Where term_id of Term 1 is “1”. ‘include_children’ => false ) ) ) ); $item->title = … Read more

Echo custom taxonomy values

You will be able to get the list of custom taxonomy by following code : <?php //list terms in a given taxonomy using wp_list_categories (also useful as a widget if using a PHP Code plugin) $taxonomy = ‘genre’; $orderby = ‘name’; $show_count = 0; // 1 for yes, 0 for no $pad_counts = 0; // … Read more

WordPress search form and search result through ACF field in custom taxonomy

This should hopefully help you on your way, although I’ve not fully tested it… The basic search form here which will load the site_url() with appended search query string. You should change this to better reflect your site layout such as <?php site_url( ‘search’ ); ?> (‘http://website.com/search‘). Place the Results page code within the results … Read more