[Resolved] [Plugin: Sociable] Help with Sociable and Permalinks
Okay… So today I installed Sociable from the WordPress dashboard. I configure everything…blah blah blah. And it’s working fine. Then I change my permalinks ( /%category%/%postname% )… Now when I click my post to view the full post… it only displays the alt tags for all the icons.
What to do?
Everything works fine if I set my permalinks to the default ( /?p=123 ). But I don’t want to use the default permalinks.
Are you using relative paths like
To ensure non-breaking of images and the like when you use pretty permalinks, you need to use something like this:
<?php bloginfo('stylesheet_directory'); ?>to point to the images folder in your theme as the bit of WP-specific php code auto-points to your theme.
So let’s say your theme has an images folder.
Here is how one would embed an image:
<img src="<?php bloginfo('stylesheet_directory'); ?>/images/blah.png" alt="" title="" />
Unless you don’t care about google and the other search engines logging/ranking the content of your site, it is better, according to google, stay with the default permalink:
“Providing search engines with dynamic URLs should be favored over hiding parameters to make them look static.”
the default permalink (example: …/?p=123) “should be favored”
All the other peralink options are static.
Google has an entire page on the subject:
If following google’s advice means your icons will show up, and make search engines happy, then it is a win-win for both you and google.
Otherwise, did <?php bloginfo(‘stylesheet_directory’); ?> help?
Unless you create unreadable permalinks by introducing absolutely irrelevant context into them (or your topics/post titles are just THAT irrelevant), using WordPress’ permalink structure should produce no problems and can actually offer advantages to the viewers who come across your site.
I agree that in terms of Google, dynamic URLs are ‘just fine’ to them and can supposedly/probably produce equivalent results to static URLS, but I also believe and see that the article is geared towards people who have weird-looking multi-part dynamic URLs trying to do rewrites and rewriting them in ways that are actually worse for Google.
Maybe it’s just my opinion, but the evidence is in the URL you posted.
If Google were so anti dynamic-URLs-being-changed-to-static-lookalikes, they themselves wouldn’t have used pretty permalinks for their own blog post URLs.
Again, maybe it’s just my own two pennies, BUT:
IF ANYONE is planning on creating themes that can be exported to other WPs or used by other people who DO like using ‘pretty’ permalinks regardless of possible SEO and Googling troubles:
It is honestly best to use the structure I just described for your links used within the theme.
Links in posts need to be/should be hardcoded, but links within the theme to images and the like can use the php WP code to ensure that NO matter what links someone chooses, their image links and such won’t break.
is it possible to put this in the “image directory” setting on the Sociable plugin? If it’s not possible, then this will not help me.
<?php bloginfo('template_url'); ?>
Did you make a backup and try it and see?
If it doesn’t work, then you might have to hardcode the links or you might have to do a bit of plugin setting fiddling.
Also, have you read the documentation from Yoast’s site about the plugin?
Personally, I used Sociable for a short period of time (and so don’t have full knowledge of this plugin) and decided to go with AddThis instead.
For sure I know that the path to the images is being broken somehow, but how exactly to fix it for this particular plugin I am not positive.
Also, I’m reading the documentation on the plugin and the particular linking structure I showed you works if the images are located in your THEME.
If the images are located in your plugin files, the structure will be different.
Have you tried deactivating and reactivating the plugin now that you have the pretty permalinks?
i’ve tried deactivating, etc… doesn’t work.
i might have to go with a different plugin… one that actually works with the permalinks i’m using.
So I tried the Sociable plugin with my WP setup 2.8 and using pretty permalinks. … And I have no problems with the icons showing up.
Do you use any other plugins that could affect the permalinks or could conflict with the Sociable plugin? Any settings to your WP itself?
As for other similar plugins, I honestly can’t make any recs, because I myself use AddThis (manually added, not the plugin version).
There IS an AddThis plugin that you can look up and it does similar stuff as Sociable and I haven’t had trouble with images or icons.
you won’t have any problems with it if you use the icons it comes with…however, i opted to use a different icon set (it has the exact same filenames, ex: twitter.png, facebook.png, etc…).
but anywho, I had to go into the plugin (sociable.php) and set a variable to an absolute path to my icons-folder, instead of using a relative path.
open sociable.php, go to line 562 and comment-out the following:
// $imagepath = get_option('sociable_imagedir');
directly under the previous line, add this line:
$imagepath = "http://yourdomain.com/wp-content/themes/theme-name/images/socialicons/";
- The topic ‘[Resolved] [Plugin: Sociable] Help with Sociable and Permalinks’ is closed to new replies.