WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
[resolved] [Plugin: WordPress SEO] Custom excerpt as Meta Description (8 posts)

  1. efa
    Member
    Posted 3 years ago #

    I'd like to use the custom excerpts I've written for all my posts as the Meta Description with the WordPress SEO plugin. I've tried using %%excerpt_only%% and %%excerpt%% in the meta description box for posts (on the plugin's Tilte Settings page), but neither seems to work. Am I doing something wrong, is it not possible to do what I'm trying to do, or have I encountered a bug?

    FYI, I'm working on a localhost (for now), so I can't post a link to the site.

    Thanks.

    http://wordpress.org/extend/plugins/wordpress-seo/

  2. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Could you try with version 0.1.5 and see if it works for you now? I've found a small bug with %%excerpt%%, that'll be fixed in 0.1.6, but %%excerpt_only%% should work fine, and %%excerpt%% works, just adds "Continue reading" to the text, and that's not really needed ;)

  3. efa
    Member
    Posted 3 years ago #

    I tried, but no luck. I just upgraded to 0.1.6 (from yoast.com, not wordpress.org, as it did not show up as an upgrade on my plugin admin page). I have %%excerpt_only%% set as my meta description template for posts and pages. I then went to edit one of my posts, and the excerpt shown in your snippet preview is a truncated version of the post text, not the custom text I put in the "Excerpt" box.

    I also tried changing to %%excerpt%% and nothing changed.

    FYI, if I copy the custom excerpt into your meta description box, the snippet preview looks fine. However, I'd rather not have to do this manually for all my existing posts and pages.

    Let me know if you need any additional info. Thanks.

  4. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    Is it not working on the front end or in the snippet preview?

  5. efa
    Member
    Posted 3 years ago #

    On the front end (checked by viewing page source) I am only getting the title tag, while in the snippet preview I'm seeing the automated meta description.

    FYI, I have modified the code in my theme's header.php to have custom title and description for the home page (I haven't figured out how to do this (if this possible) with your plugin):

    <?php
       if(is_home()) echo
          '<title>Custom Home Page Title</title>',
          '<meta name="description" content="Custom Home Page Description"/>';
       else echo
          '<title>',wp_title(''),'</title>';
    ?>

    I temporarily switched this to <title><?php wp_title(''); ?></title> per the plugin instructions, but nothing changed.

  6. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    The meta description created by my plugin will appear lower, not right underneath the title, due to the wp_head()call being later in the theme. If there is no meta description you should be seeing a comment in the source explaining that...

  7. efa
    Member
    Posted 3 years ago #

    Thanks for the followup. The description is being included in the source further down, just as you stated, and it is the custom excerpt, not a truncated version of the post. I have also confirmed that the snippet preview when I edit a post is being generated from the post text and not the custom excerpt. So, this is only a backend problem, the post is being published with the appropriate description. It would be nice to have this fixed at some point, but I'm good to go.

    FYI, I already upgraded to 1.7.1

  8. Joost de Valk
    Member
    Plugin Author

    Posted 3 years ago #

    You're right efa, just added that in for version 0.1.8 so then you should be ENTIRELY good to go :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic