• Hy everybody, Tanks a lot for this plugin, works very fine.

    Im my site, I want put this pluing in my pages, not only in posts. Then, I made a small hack to work and I want to confirm if correct:

    on wp-content/plugins/o3-social-share/o3-social-share.php I change the line 45:

    from if(is_single($post->ID))

    to if(true)

    Have this a problem?
    And then I put the method <?php o3_output_social_plugins(); // Get o3 Facebook plugin ?> in page.php.

    Thanks
    Rainer Krüger

    https://www.ads-software.com/extend/plugins/o3-social-share/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Brian Onorio, O3

    (@weareo3)

    You shouldn’t need to call the o3_output_social_plugins(); at all if you change the line 45 as you did.

    What that line does is check to see if it is a single page. Alternatively, you can change that line to

    if(is_sinuglar($post->ID) which will check to see if it is either a Post or a Page (or a singular item of a custom post type).

    Everything else should work dandy.

    I’ll note this for the next update to include the ability to also post to Pages.

    Plugin Author Brian Onorio, O3

    (@weareo3)

    We’ve released version 1.1 of the plugin. It now has native options to allow you to add to posts or pages. Get the update!

    Hi Brian —

    I’m trying to drop this into the entry-utility div of a thematic child theme and can’t seem to get it to work. Anything I put between ‘ ‘ will show up no problem… just not this code or variations on it. I feel that I’m missing something super simple.

    function my_postfooter($postfooter) {
    $postfooter = str_replace(“</div><!– .entry-utility –>\n”, ”, $postfooter);
    $postfooter .= ‘
    ‘;
    $postfooter .= ‘echo o3_output_social_plugins()’ ;
    $postfooter .= “</div><!– .entry-utility –>\n”;
    return $postfooter;
    }
    add_filter(‘thematic_postfooter’, ‘my_postfooter’);

    Plugin Author Brian Onorio, O3

    (@weareo3)

    The ot_output_social_plugins function returns as a variable. You can’t assign an echo request to a variable. PHP take the echo command and outputs it. That data can’t be assigned.

    What you need to do is:
    $postfooter .= o3_output_social_plugins();

    Thanks, Brian!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: O3 Social Share] Enable plugin in WordPress pages’ is closed to new replies.