WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. nellygrl
    Member
    Posted 10 months 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.

    http://wordpress.org/plugins/floating-social-bar/

  2. Torben Heikel Vinther
    Member
    Posted 10 months ago #

    I would like to know that too :-)

  3. Bart van Maanen
    Member
    Posted 9 months ago #

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

  4. Franck160
    Member
    Posted 7 months ago #

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

    Apart from that, nice pluging!

  5. Franck160
    Member
    Posted 7 months 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
    Member
    Posted 7 months 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
    Member
    Posted 6 months 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
    Member
    Posted 6 months ago #

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

Reply

You must log in to post.

About this Plugin

About this Topic