Is any way to don`t display shrort description in a single entry page?

It is necessary to be able to write any text, then paste the tag "more". This content should be displayed only on the list of records page. But it should not be displayed on the single entry page.

  • How are you showing content? the_content() will show the full content on single pages. Oct 6, 2016 at 8:31
  • @DaveRomsey Exactly, I use the_content();
    – wkornilow
    Oct 6, 2016 at 8:34
  • Since you are already using the_content() then It would be better if you show some code of your. how we can offer any suggestion without seeing any code?
    – Rishabh
    Oct 6, 2016 at 9:17

2 Answers 2


the_content() will show the full content on single pages even if there is a <!--more--> tag present.

On archive pages, only the excerpt will be shown, provided that a <!--more--> tag is present.


I don't quite get your question but his worth a try, if I am understanding you. Add this function to your functions.php or a related file

function get_excerpt2($count){
  $permalink = get_permalink($post->ID);
  $excerpt = get_the_content();
  $excerpt = strip_tags($excerpt);
  $excerpt = substr($excerpt, 0, $count);
  $excerpt = substr($excerpt, 0, strripos($excerpt, ""));
  return $excerpt;

And then return this code in your template with desired number of characters in the function.

Full code in this gist https://gist.github.com/bahiirwa/d773a50708fbd25a3b5f98823a2a296b

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.