WordPress Picks Up Wrong Template for Custom Post Type Archive Page

You can manage this via the template_include hook. add_filter( ‘template_include’, ‘cats_and_dogs_living_together’, 99 ); function cats_and_dogs_living_together( $template ) { if ( is_post_type_archive( array ( ‘cat’, ‘dog’ ) ) ) { $new_template = locate_template( array( ‘archive-dog.php’ ) ); if ( ” != $new_template ) { return $new_template; } } return $template; } Hope this helps!

custom post type template

This might be completely off the mark, but have you tried regenerating your .htaccess file, after creating the new post type. This usually results in some awkward behaviour. To do this, simply go to settings->permalinks and hit “save”. In terms of the template structure, everything does seem fine.

disable quickedit for specific custom post type user role

You can try post_row_actions hook: /** * Hide quick edit * * @internal Used as a callback. * * @see https://developer.wordpress.org/reference/hooks/post_row_actions/ */ function wpse288663_hide_quick_edit($actions, $post) { // Replace `{$cap}` with your specific capability. if (CPT_SLUG === $post->post_type && current_user_can({$cap})) { unset($actions[‘inline hide-if-no-js’]); } return $actions; } // Hook up. add_filter(‘post_row_actions’, ‘wpse288663_hide_quick_edit’, 10, 2);

How do I create an overview page with custom calculations from a post-type?

It seems you are asking for a complete custom funcionality, To add menu, you can use this. function wpdocs_register_my_custom_menu_page() { add_menu_page( __( ‘Custom Menu Title’, ‘textdomain’ ), ‘custom menu’, ‘manage_options’, ‘myplugin/myplugin-admin.php’, ‘custom_callback_function’, plugins_url( ‘myplugin/images/icon.png’ ), 6 ); } add_action( ‘admin_menu’, ‘wpdocs_register_my_custom_menu_page’ ); function custom_callback_function(){ echo ‘Here is my page contents’; } https://developer.wordpress.org/reference/functions/add_menu_page/ You can use … Read more

How to get a custom type post data when it has a connection with another custom type post?

If in a country looking for cities $args = array ( ‘post_type’ => ‘cities’, ‘meta_key’ => ‘country’, ‘meta_value’ => get_the_ID() ); This assumes that the “Country > Name* > [drop down]” you screenshot saves that the selected value using post_meta and is saving the country’s post ID. (If it does not please adjust or specify). … Read more

CRUD operations in wordpress

All of your requirements can be achieved with WordPress either through the use of plugins and/or the development of custom code. If you are not familiar with WordPress development, then you may find the learning curve to be quite steep at first even if you have good web-development knowledge. However if you have a bit … Read more