Support » Plugin: Floating Social Bar » Adding Post Comments to Social Bar

Viewing 7 replies - 1 through 7 (of 7 total)
  • I would like to know that too 🙂

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

    +1 😉 Or even better, would be nice to add the feature directly into the bar 🙂

    Apart from that, nice pluging!

    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 🙂

    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.

    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.

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

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Adding Post Comments to Social Bar’ is closed to new replies.