• Resolved kmbee

    (@kmbee)


    Hi Robin, I am running a customized Genesis 2.8.0 Child Theme with excerpts enabled.

    When I choose the option to display the Share “After Content”, it works as expected.

    The problem is that when I leave the excerpt blank on any page, then the text “Share this post:TwitterFacebookLinkedinEmail” is displayed in the area where the excerpt would be. The Share icons still do display properly after the content as well.

    So in effect, there are 2 instances of the Share on any page where there is no excerpt.

    If there is an excerpt, then the excerpt and the Share is displayed as expected.

    What would be causing this? Any help is appreciated, thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Robin Cornett

    (@littlerchicken)

    If you have excerpts displaying on your singular posts/pages, it sounds like there is some custom functionality affecting what’s being output by the_content filter, or maybe some custom code is adding an additional instance of the filter (if the child theme has a line like apply_filters( 'the_content'.... related to your excerpt, maybe–that is what I would look for).

    Since you are using Genesis, you could tell the plugin to use the Genesis specific locations–this would still put the buttons after your entry content, but above the entry footer. This approach uses an action hook instead of a filter, so may bypass the issue you’re encountering.

    Changing to this is pretty straightforward if you are okay with adding some code to your site. You can add this to your child theme’s functions.php file, or in a place where you keep custom code:

    
    // Tell Scriptless to use Genesis action hooks instead of the default the_content filter.
    add_filter( 'scriptlesssocialsharing_prefer_genesis_hooks', '__return_true' );
    

    Just make sure your files and site are backed up and please practice safe coding.

    Thread Starter kmbee

    (@kmbee)

    Thank you so much for that Robin, your code did the trick. If I figure out why I have this issue, I will post the reason here. Thank you for this nice little plugin.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Share Text is Displaying Where Excerpts Would Be’ is closed to new replies.