• There is a plugin called “Improved Include Page” which allows to include content of a page into another page.

    So, say that we have Page1. We created Page2 that includes Page1 by using the shortcode [include-page id=”1″]. When Page2 is rendered you will see 2 social media bars; one after the text included from Page1, and another for Page2 itself.

    It appears that Sociable for WordPress 3.0 plugin appends the social media bar after rendering any page in WordPress, even if included from another page.

    I am requesting to solve this problem in the next version of the plugin by hooking the social media bar on the container page only, or on the last appearance of the hook in the page.

    It is also worth noting that even if Page1 has sociable disabled. if Page2 includes Page1, 2 social media bars will still appear; this is because the plugin enabled the hooking of the bars on the container page but has hooked it on any appearance of the hook. You see what I mean?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter wprunner

    (@wprunner)

    To see what I mean,

    here is Page1 snapshot:
    https://img840.imageshack.us/i/page1r.jpg/

    Page2 snapshot:
    https://img715.imageshack.us/i/page2sy.jpg/

    Thread Starter wprunner

    (@wprunner)

    More:
    When the include code (to include content from page) is used in a widget of the sidebar, the social media bar displays there as well. That just makes the situation worse, I can’t use the plugin at all with that ??

    If the post/page that pertains to the displayed page has a unique hook that can be identified by the pluign, then the plugin should hook the social media bar to it explicitly ignoring the other hooks in the displayed page (that contains the main post, the included post in the post, and/or the included post in a widget)

    So say a rendered page had 3 hooks, the plugin should identify the hook of the real post/page and ignore the others.

    Plugin Author tompokress

    (@tompokress)

    Hi,

    I’ll take a look at the include page plugin, but I’m not hopeful – it WP doesn’t provide much information about the context in which a post is being rendered (it’s even hard to tell if the post is being rendered as an excerpt or full content).

    One suggestion is you could use the checkbox on the post meta screen to turn off sociable in selected posts, if you know you’ll be including them in another posts.

    If you’re able to use php code you could do a check of the environment variables to determine the url you are at, which can be used to discover the outermost container page. There may be a way to check parent page or ancestors which could work also.

    I’m also interested in something like this — I’m using code in my page.php to print excerpts of child pages after the content of the page itself.

    so, the_content is generating the page content along with the sociable toolbar.

    then, the_excerpt is called for each child page and each of them also has the sociable toolbar included.

    I tried a little CSS dabbling to do “display: none;” for some of the classes and ID’s that I thought would match the excerpts but either I’m not good enough to figure it out or it’s just not the right way to do it.

    Any suggestions? I’m probably gonna need to ditch sociable unless I can restrict it’s use to full post/page displays and not excerpts.

    I had this trouble of socialable duplicating so I put the php code in my template `<?php if (function_exists(‘sociable_html’)) {
    echo sociable_html();
    } ?> ` and unticked individual blog posts. This resolved this issue

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Plugin: Sociable for WordPress 3.0] Duplicate social media bars when used with Improved Include Pag’ is closed to new replies.