Support » Fixing WordPress » How can I add a CSS class to Sociable links
8 years, 2 months ago
I’d like to add class="snap_nopreview" to my Sociable links.
I thought I might be able to add the class to Line 797 of sociable.php, as such:
$html .= "\n<div class=\"sociable\" \"snap_nopreview\">\n";
However, that didn’t work.
The extra class is necessary to disable site previews provided by my Snap script.
Any suggestions on how I might accomplish this?
Your source looks a little off. You don’t need double quotes between each class. Multiple classes should all go in the same pair of double quotes, separated by spaces:
$html .= "\n<div class=\"sociable snap_nopreview\">\n";
Try that and see if it works for you.
If that doesn’t work, let me know 🙂
That did the job.
Thanks, shifuimam and joost!