A
A
Alexey Chumachenko2021-08-03 21:07:36
WordPress
Alexey Chumachenko, 2021-08-03 21:07:36

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. 610983a17bae0803032753.png
Screenshot of the block that I use
61098416df402022095848.png
Screenshot of how I display a post on the main
610984b42839b203549830.png
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,
  ) );
}

Access to the site femida.example3.pp.ua
login: wp-admin
password: 12345678
I would be very grateful for any help.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Chumachenko, 2021-08-04
@help2018

"Next tag" did not work correctly because it was inside the "column" block

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question