CPT posts listed by category with custom rewrite URL, please help!

I did look at your code and saw you changed the original code. To make it more clear what you can achieve with this snippet. You would end up with the following permalinks: /recetas-argentinas/category/desserts Shows all post with the post_type recetas-argentinas and with the category desserts. /recetas-argentinas/my-single-recept-post Shows a single post of the post_type recetas-argentinas. … Read more

WP-Admin edit.php & post.php slowdown after import of 10k users

Solved. Had a custom author drop down function that causes a large query loop. add_filter(‘wp_dropdown_users’, ‘cust_dropdown_users’); function cust_dropdown_users($output) { $users = get_users(); $output = “<select id=\”post_author_override\” name=\”post_author_override\” class=\”\”>”; //Leave the admin in the list $output .= “<option value=\”1\”>Admin</option>”; foreach ($users as $user) { $sel = ($GLOBALS[‘post’]->post_author == $user->ID) ? “selected=’selected'” : ”; $output .= ‘<option … Read more

How to do a query on custom taxonomies that is uncategorised?

Okay thanks for all the helpful comments. It turns out there is no way to do this using WP_QUERY alone. The best way I can think of is to do it is like so: $taxIds = get_terms($options[‘post-types’][$this->current_post_type->name], array( ‘fields’ => ‘ids’, )); $uncategorisedQuery = new WP_Query( array( ‘post_type’ => $postType, ‘posts_per_page’ => -1, ‘tax_query’ => … Read more

Help with CPT template pagination

there is no need to handle the pagination like this: $paged = get_query_var( ‘paged’, 1 ); Just put this after the loop: get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => ‘&nbsp;’, ‘next_text’ => ‘&nbsp;’, ‘screen_reader_text’ => ‘A’ ) like this: if( have_posts() ){ while( have_posts() ){ the_post();?> the_content();?> <?php } echo get_the_posts_pagination( ‘mid_size’ => 1, ‘prev_text’ => … Read more