Is it possible to create a custom post type with blank page for Post List and Add Post Page only?

Hiding the admin UI that WP generates is trivial and well documented in the official WP Developer docs for register_post_type: https://developer.wordpress.org/reference/functions/register_post_type/ show_ui bool Whether to generate and allow a UI for managing this post type in the admin. Default is value of $public. and show_in_menu bool|string Where to show the post type in the admin … Read more

Why does have_posts() return false when in the wordpress admin, but not on the frontend?

To get your posts to display in the Gutenberg editor, you’ll likely need to create a separate query specifically for your custom block. This is because Gutenberg doesn’t use the main query in the same way the front end does. Something like this: $args = array( ‘post_type’ => ‘your_custom_post_type’, // Replace with your custom post … Read more

Custom post type slug localization

First, you should have to register your custom post type with a generic, language-independent slug because the slug in register_post_type is not meant to be dynamic. and then modify rewrite rule try this snippet function register_custom_post_type_services() { $labels = array( ‘name’ => _x(‘Services’, ‘Post Type General Name’, ‘text_domain’), ‘singular_name’ => _x(‘Service’, ‘Post Type Singular Name’, … Read more