WordPress.org

Ready to get started?Download WordPress

Forums

Share Buttons by AddThis
[resolved] [Plugin: AddThis] Can't show buttons in Blog Excerpts page (6 posts)

  1. James Hedley
    Member
    Posted 1 year ago #

    I can only get the like/share buttons to show around the blog excerpts on the main blog page, if I have 'show on homepage' shown in the plug in options

    Toggling the 'show on pages' option works, but show on excerpts has no effect on it's own. Any thoughts as to why they appear when I tick 'show on homepage'?

    http://wordpress.org/extend/plugins/addthis/

  2. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 1 year ago #

    Hey James,

    Excerpt option works only if your theme uses the_excerpt() function to display the content in home page. If it's a publicly available theme, can you let me know the theme name so that I can try it?

  3. James Hedley
    Member
    Posted 1 year ago #

    Sure - the theme is from http://themeforest.net/item/dandelion-powerful-elegant-wordpress-theme/136628

    If you can't tell from there, let me know what code I should be looking for and maybe I can work it out that way.

    Thanks.

  4. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 1 year ago #

    James,

    Unfortunately it's a paid theme and I cannot see the theme files. I recommend you to check the file which renders the Home page (index.php in most cases). See whether the the content is pulled by the wordpress function the_excerpt() or the_content(). I assume by the nature of design, theme is not using excerpt, but trimming the content on its own to fit exactly on the limited space. If that's the case, you can have it called by adding a little php function as explained here: http://www.addthis.com/blog/2011/03/03/addthis-for-wordpress-plugin-version-2-0-2/#.UGV8uvmH5nh

  5. 7le
    Member
    Posted 1 year ago #

    I have the same problem when I'm using: <?php echo wp_trim_words(get_the_excerpt(), 24); ?> to custom trim the excerpt. Is there a possible way to have an option to add AddThis inside a specified DOM element or a list of DOM elements identified by class name or ID.

    An answer will be much appreciated.
    Thanks.

  6. Srijith V
    AddThis Samurai
    Plugin Author

    Posted 1 year ago #

    In this case, you can call AddThis buttons from the theme itself. Add the following code in your theme file where you want to display the button. Make sure that you have disabled Top & Bottom sharing in AddThis settings to avoid duplication.

    <?php if (function_exists('addthis_display_social_widget')) echo addthis_display_social_widget(''); ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.