WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How can I add a CSS class to Sociable links (5 posts)

  1. bobjones
    Member
    Posted 5 years 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?

    Thanks.

  2. shifuimam
    Member
    Posted 5 years ago #

    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.

  3. Joost de Valk
    Member
    Posted 5 years ago #

    If that doesn't work, let me know :)

  4. bobjones
    Member
    Posted 5 years ago #

    That did the job.

    Thanks, shifuimam and joost!

  5. Joost de Valk
    Member
    Posted 5 years ago #

    Good :)

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags