• Resolved James Hedley

    (@james-hedley)


    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/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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?

    Thread Starter James Hedley

    (@james-hedley)

    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.

    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

    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.

    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(''); ?>

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: AddThis] Can't show buttons in Blog Excerpts page’ is closed to new replies.