Hi manoucho, try this…
<?php if( function_exists( do_sociable() ) ){ do_sociable(); }
Please tell us how it works in your site.
Hi!
Thanks a lot for y our answer!
Just to be sure, can you tell me where I should add this code? header.php ?
Thanks!
Manu
manoucho add code in the place that you want to appear.
I have the same problem as Manoucho. Your answer doesn’t makes too much sense to me. s far as I understand, you can add the shortcode in the visual editor, or you add the php code mensioned above in the html part, but then the code disappears?
Manoucho is correct that this code belongs in a php file.
Please elaborate! Thanks.
PS: I just checked your code. It is not complete.it should be
<?php if( function_exists( do_sociable() ) ){ do_sociable(); } ?>
But this doesn’t help us to add the icons to a wordpress page or post.
Fixed this by doing a simple tweak. Seems as though he didn’t register the shortcode in his code…
Under the line add_filter( ‘the_excerpt’, ‘auto_sociable’ ); in the sociable.php file (found under wp-content/plugins/sociable/), put this line:
add_shortcode( ‘sociable’, ‘sociable_shortcode’ );
Shortcodes should work like a dream now 🙂
Hi,
I have used the following line in my page : < ?php if (function_exists(‘sociable_html’)) {echo sociable_html();} ?>
and have added : add_shortcode( ‘sociable’, ‘sociable_shortcode’ );
in the sociable.php file as mentioned
but nothing happens, or more precisely it is the line of code that appears and not the symbols.
Can you help ?
By the way, the Email button is linked to Google. How can one include a button that links directly to the visitor’s email ?
Thanks,
Jean-Claude
Dear Incunix;
Nice. That code solved my (same) problem using this shortcode:
[sociable/]
I’d like to kill the borders above and below the icons, and right-align them. Suggest any code for that? (I’d be appreciative). Site currently self-hosted (so no link).
Thanks if you can,
Marta
http://www.martavictoria.com
@martavictoria
Nice site you’ve got.
What do you mean by “That code solved my (same) problem using this shortcode:
[sociable/]”
How did you go about it ?
Jean-Claude (in the process of merging site+blog under WP) – present site http://www.atlantique-photo.com
Thanks.
I followed Incunix’s directions to add code to the php file:
Under the line add_filter( ‘the_excerpt’, ‘auto_sociable’ ); in the sociable.php file (found under wp-content/plugins/sociable/), put this line:
add_shortcode( ‘sociable’, ‘sociable_shortcode’ );
To do that, I made a back-up copy of the php file first (as a safety) before editing it. Then I used Notepad (or Word pad; but NOT Word) to make the change directly to the php file.
Then, after changing the Shelf Theme .php file, I added this shortcode:
[sociable/]
directly into the html code of the post itself — right where I wanted the social icons to appear. Then, in the Sociable admin area, I turned off all Location placements (because it was appearing twice — once where I told it to, and also where Sociable’s Location told it to).
I hope that’s specific enough? I’m sorry the site’s not live, yet; to see. Feel free to write again, if not?
Marta Victoria
http://www.martavictoria.com
Hi Marta,
I don’t know where I went wrong first time or whether your explanation was clearer 😉 but I’ve got it in the end.
Thanks a bomb ! (or words to that effect…)
Jean-Claude
I prefer using shortcode exec php and use the php code in there. 🙂
Under the line add_filter( ‘the_excerpt’, ‘auto_sociable’ ); in the sociable.php file (found under wp-content/plugins/sociable/), put this line:
add_shortcode( ‘sociable’, ‘sociable_shortcode’ );
it works fine now with this !