Add management screens to post type

The good news is I have found a solution. The (kind of) bad news is that the menu has to be created manually. It would use a combination of the add_menu_page and add_submenu_page functions. The codex pages have the format for the functions. The menu would be add_action( ‘admin_menu’, ‘register_my_custom_menu_page’ ); function register_my_custom_menu_page(){ add_menu_page(‘My Custom … 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

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

Custom post type and taxonomy permalinks – Structure

DID IT My problem was the miss code found in the array of the custom post type texturas_temp This: // Register Custom Post Type function texturas_temp() { $labels = array( ‘name’ => _x( ‘texturas_temp’, ‘Post Type General Name’, ‘text_domain’ ), ‘singular_name’ => _x( ‘Textura’, ‘Post Type Singular Name’, ‘text_domain’ ), ‘menu_name’ => __( ‘texturas_temp’, ‘text_domain’ … Read more