Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #232118

    mpark0701
    Participant

    Using Customize >> blog >> content , I set

      post meta is on, Full Post Content on Index is off, and Excerpt Length is 60

    Without using excerpt field under each post backend editor, it shows excerpt content automatically with read more link. It works fine.

    Now I tried to setup Rss to email using Mailchimp Email Form. However, there is no excerpt content (only link to single post) under meta description section of mydomain.com/feed .
    When I fill out some text on the excerpt field under each post, it shows under meta description section of mydomain.com/feed.

    But I like to use built-in auto excerpt way. How can I add some of front text of single post into meta description section so that I can send rss to email with some of excerpt content using Mailchimp. By the way, the meta description field on Yoast Seo plugin doesn’t help it.
    Thanks.

    #232503

    Rad
    Moderator

    Hey there,

    Thanks for writing in! Regretfully, this particular customization request is outside the scope of our support as this is not related to an issue with the theme and instead has to do with your customization of it. As such, you will need to investigate this particular issue on your own or seek help from a developer should you not feel comfortable making these changes yourself. If you have any further questions about the theme, we are more than happy to provide you with assistance on these inquiries.

    Thank you for your understanding.

    #232829

    mpark0701
    Participant

    I found this article.

    Automatically Create Meta Description From The_content

    Adding this snippet into the functions.php file of your WordPress theme will automatically create a meta description from your WordPress post, striping out all shortcodes and tags. Also ensure that you have it in the header.php of your WordPress theme or this snippet will not function.

    function create_meta_desc() {  
        global $post;  
        if (!is_single()) { return; }  
        $meta = strip_tags($post->post_content);  
        $meta = strip_shortcodes($post->post_content);  
        $meta = str_replace(array("\n", "\r", "\t"), ' ', $meta);  
        $meta = substr($meta, 0, 125);  
        echo "<meta name='description' content='$meta' />";  
    }  
    add_action('wp_head', 'create_meta_desc');

    When I add this code into functions.php inside child theme, but it doesn’t work. Which part of above code should be adjusted to fit x-theme?

    Thanks.

    #233037

    Rad
    Moderator

    Hi there,

    The code you just gave will only meta description form your site’s <head>. And it’s main purpose is to give your site’s a description when search engine crawls your site. SEO plugins do that automatically.

    The feed is not related to your coding, it’s not related to customizer’s blog meta option, and it’s not related to any SEO meta data. The term meta depends to where is being used.

    So you should contact someone that is familiar blog feeds. You may need to do feed template customization which is different from standard wordpress templates.

    Thanks.