Answer the question
In order to leave comments, you need to log in
Why does adding a “tag next” block in Gutenberg in a custom post type duplicate the content of the post?
Good day. please tell me how to solve the following problem.
Created my own custom post type called "Services". When displaying a post on the main page of the site, when I use the "tag next" Gutenberg block, for some reason the content of the post is duplicated. When displaying native WordPress posts, there is no such error. Screenshot below.
Screenshot of the block that I use
Screenshot of how I display a post on the main
page Perhaps I'm missing something when creating my post type?
add_action('init', 'femida_uslugi');
function femida_uslugi(){
register_post_type('uslugi', array(
'labels' => array(
'name' => 'Услуги',
'singular_name' => 'Услуги',
'add_new' => 'Добавить услугу'),
'public' => true,
'publicly_queryable' => true,
'show_ui' => true,
'show_in_menu' => true,
'query_var' => true,
'rewrite' => false,
'capability_type' => 'post',
'has_archive' => true,
'hierarchical' => false,
'menu_position' => null,
'menu_icon' => 'dashicons-businessman',
'rewrite' => array( 'slug' => 'uslugi', 'with_front' => true ),
'supports' => array('editor', 'title', 'thumbnail', 'excerpt'),
'show_in_rest' => true,
) );
}
Answer the question
In order to leave comments, you need to log in
"Next tag" did not work correctly because it was inside the "column" block
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question