Support » Plugin: AddToAny Share Buttons » Strip the page number from multi-page permalink when sharing

  • I haven’t found the answer to my question.

    Is there a way to remove a certain page from being shared? For example, I have a 3-page post but when people share the post, the 3rd page is being shared on Pinterest and not the first. is being shared instead of

    I had to disable the plugin because of constant inquiries re: the beginning of this oil stain tutorial.

    I was using this php coding <?php if( function_exists(‘ADDTOANY_SHARE_SAVE_KIT’) ) { ADDTOANY_SHARE_SAVE_KIT(); } ?> in a Genesis hook that shows up in each post, so I cannot modify the shortcode because it would affect every post.

    How can I use this sharing plugin on all of my posts, but strip the numbered pages (parameters) on multi-page posts from being shared?

    Thanks so much!

Viewing 1 replies (of 1 total)
  • Plugin Author micropat


    AddToAny’s shortcode, and the PHP hardcoded method you’re using should, point to the real permalink regardless of the page number.

    Double-check that you’ve placed that line of PHP code in the appropriate Genesis loop, which itself should, importantly, be within The Loop.

    A sign that you’re outside The Loop is that, with AddToAny enabled, you see the following empty JavaScript properties when you ‘view source’ from your web browser:

    Instead, the JavaScript properties should be filled in like:
    {title:'How to Remove Set In Oil Stains',url:''}

    For empty values, AddToAny falls back to using the current page, which is most likely why the post’s page numbers are getting shared.

    Check with Genesis for where in The Loop to place AddToAny’s PHP code.

Viewing 1 replies (of 1 total)
  • The topic ‘Strip the page number from multi-page permalink when sharing’ is closed to new replies.