This topic has 6 replies, 2 voices, and was last updated 8 years by MichaelP.

  • Author
  • #101715
     MichaelP
    Participant

    Excerpts are only showing on the blog page but not on the single blog page. How can I change this?

    #101727
     sharmstr
    Moderator

    I think the idea is “why show an excerpt when the full text is there.” With that said, where do you want them to display on the single page?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #101813
     MichaelP
    Participant

    Because the excerpt is the second most important part (after the title) of an article when it comes to SEO. The excerpt has to be on the same page as the article and it needs a specific style. It should have a meta description tag, so search engines know what the page is about and display the excerpt on SERPS. The excerpt is also important for visitors, so they know what the article is about and can decide whether it makes sense to read ahead.

    The vast majority of professional sites highlight the excerpt at the top of article. I am very much surprised that the KLEO theme doesn’t do that by default. That’s why assumed it is a bug or that a plugin interferes. No offense, but you also could have asked why the title or the author name have to be on the single page if they are already on the blog page.

    Having said that, KLEO is by far the best theme I ever worked with!

    #101815
     sharmstr
    Moderator

    Saying that “the full text is on the single page, why do you need the excerpt” is not the same as saying “why do you need the title and author when its on the blog listing”.

    Anyhoooo, I’m just a moderator here and all my blog sites are private so I have little experience with SEO. Thank you for educating me. You can install Yoast SEO which will give you all of the og meta info include description.

    Now, lets fix this for you. Tell me where you want it, including the style you need it in and I’ll help you out.

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #101823
     MichaelP
    Participant

    Sorry for my somewhat rude tone. I am always like that when I have colds.

    The excerpt should either be before or after the article meta. It would be great if KLEO introduces a corresponding switch in a future release. The default style should be bold, a bigger font size is also an option.

    Because we probably will have the article meta on the side, the excerpt has to be right above the article content.

    #101827
     sharmstr
    Moderator

    Put this in your child theme’s functions.php file.

    COPY CODE
    
    function prepend_excerpt( $content ) {
    	if ( is_singular('post') ) {
    		global $post;
    		$content = "<h1>" . $post->post_excerpt . "</h1>" . $content;
    	}
    		return $content;
    }
    

    Seems odd that if this was such a big SEO deal that WP would do this automatically or have a switch in the settings. I wonder why big news sites dont have excerpts before their content and the article page. Is this a new thing?

    Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution

    This support site is not about custom work. If you need custom development please contact cornel@seventhqueen.com

    #103816
     MichaelP
    Participant

    Thanks. You forgot to add this:

    add_action(‘the_content’, ‘prepend_excerpt);

    I also wouldn’t h1 tags for the excerpt. Makes no sense.

Viewing 7 posts - 1 through 7 (of 7 total)

The forum ‘General questions’ is closed to new topics and replies.

Log in with your credentials

Forgot your details?