V
V
vintalis2020-06-26 22:39:49
WordPress
vintalis, 2020-06-26 22:39:49

Automatic WP tag additions disappeared, how to fix? And display of the post author?

I don’t understand what happened, but the automatic addition of the p tag in the editor disappeared, but I need it, how can I return it?

I hover over the editor and the P tag immediately disappears.

As well as display the name of the author of the post in single.php behind the cycle. I have all the posts in the cycle, but one post in single.php

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
vintalis, 2020-06-26
@vintalis

I didn’t understand anything, so I added the code and the tags started working, but it doesn’t show in the editor what is being added.

add_filter( 'wp_default_editor', function( $type ){
  // только для указанных типов страниц
  $html = in_array( get_current_screen()->post_type, array('post','func','hook') );

  return $html ? 'html' : $type;
});

Please help me with Another question about the_author

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question