How to convert custom post type based list to a dropdown list?

the_title() and the_permalink() are functions that automatically echoed. Use in this case get_the_title() and get_permalink(). the code should look something like this: while ( $query->have_posts($post->ID) ) : $query->the_post(); echo ‘<li><a href=”‘. get_permalink(). ‘”>’ .get_the_title() .'</a></li>’; endwhile; Here is another way using the_title and the_permalink: while ( $query->have_posts($post->ID) ) : $query->the_post(); ?> <a href=”https://wordpress.stackexchange.com/questions/191514/<?php the_permalink(); ?>” … Read more

How to restrict users and admin from creating new taxonomy terms?

This check: <?php if ( current_user_can( $taxonomy->cap->edit_terms ) ) : ?> needs to be satisfied to display the “Add New Category” link. You can set the capabilities for your schedule_day_taxonomy taxonomy, when you register it. Example Only users with the edit_schedule_day_taxonomy capability can edit the taxonomy: add_action( ‘init’, ‘schedule_day_tax_func’ ); function schedule_day_tax_func() { register_taxonomy( ‘schedule_day_taxonomy’, … Read more

Get post from custom post type order by two taxonomies

You’re close, syntax is just slightly off. I can’t quite work out how/what terms you need to query for, but this should be the structure of your arguments: $query = new WP_Query( array( ‘post_type’ => ‘product’, ‘orderby’ => ‘name’, ‘order’ => ‘ASC’, ‘tax_query’ => array( array( ‘taxonomy’ => ‘product_cat’, ‘field’ => ‘term_id’, ‘terms’ => $ids_of_product_cat_terms, … Read more