Floating Social Bar
Adding Post Comments to Social Bar (8 posts)

  1. nellygrl
    Posted 2 years ago #

    I was wondering how we would go about adding the comment anchor to the social bar like you have on your site. I really like that functionality.


  2. Torben Heikel Vinther
    Posted 2 years ago #

    I would like to know that too :-)

  3. Bart van Maanen
    Posted 2 years ago #

    Yes, me too, a bit of a tutorial would be nice.

  4. Franck160
    Posted 2 years ago #

    +1 ;) Or even better, would be nice to add the feature directly into the bar :)

    Apart from that, nice pluging!

  5. Franck160
    Posted 2 years ago #

    Here is a proposal (but no options):
    class-floating-social-bar.php, line 893

    // Add in the services.
            $output .= $services;
            // add comments
            $myval = '<a href="' . get_permalink() . '#comments" >' . get_comments_number() .'</a>';
            $output .= '<div class="sharerbubble">'. $myval . '</div>';
    	// end add comments
            // Close up the outer social bar container.
            $output .= '</div>';

    and something like that in css:

    ** Floating Social Bar
    .fsb-social-bar  .sharerbubble {
        background: url("images/singlebubble.png") no-repeat scroll 10px 0 rgba(0, 0, 0, 0);
        float: left;
        height: 25px;
        line-height: 18px;
        margin: 7px 0 0;
        min-width: 25px;
        vertical-align: top;
        border-left: 2px solid #DBDBDB;
    .fsb-social-bar  .sharerbubble a {
        color: #2D2520;
        font-family: 'Lora',Arial,Helvetica,san-serif !important;
        font-size: 14px !important;
        padding: 0 0 0 40px;

    Happy web :)

  6. entremiados
    Posted 2 years ago #

    Hi, Franck160,

    Thanks to you, I managed to have the comments count shown in my social bar. :-)

    Thank you very much for sharing this code.

  7. lustek
    Posted 2 years ago #

    this code is great, but after some time I decided I don't want comments count and that a static link "see comments" will be better. I changed the code and removed cache but still for old posts I see number of comments as a link. for new posts everything works fine.

    is the value of $output kept somewhere in the database? where can I remove old entries to have the same link on all post pages?

    thanks in advance.

  8. Franck160
    Posted 2 years ago #

    no ;) clean your cache or wait for it to be outdated.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Floating Social Bar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic