Support » Plugin: Floating Social Bar » Frontpage: like index.php, not top post

  • Resolved jubot

    (@jubot)


    Hi, amazing plugin.

    It is not uncommon for websites to have a floating bar on the front page which “like” the index page/base url. I would like to do the same but it looks like this plugin can only refer to the top post but not the page in general (index.php).

    Is there a way to make it like the front page only?

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Syed Balkhi

    (@smub)

    You can use the template tag to show it on the front-page if the front-page is actually a custom page and not the general index.php.

    Thread Starter jubot

    (@jubot)

    So it would have to be a (static) page without posts? Since otherwise it will only like the first post on the page and not the page as a whole. A static page won’t do as my frontpage.

    Is het so that this plugin will only work on pages with a single post on them? But not on a page with multiple posts like index.php and most front pages. Just to be clear: appearing is not an issue, it floats beautifully. By work I mean “like” index.php, home.php, frontpage.php etc. .

    Plugin Author Syed Balkhi

    (@smub)

    This plugin will work on pages with multiple posts, but it will only add the social media buttons on the main post/page. For example: Your single post can have related post display, popular post in the sidebar, etc.

    Let me elaborate on how this plugin functions and the decisions we made to help you understand why it wouldn’t work on index.php.

    To make this plugin as fast as we can, we thought of majority use cases. Most folks have excerpts being shown on their homepage. Prior to creating this plugin, we tested numerous options to find the best placement on the site WPBeginner.

    Our readers simply didn’t share articles from the archive pages / front pages. Why would they? They haven’t read the article. Understandably most shares came from the single post pages. Then we treid above post // below post etc. Until we settling with the floating which ended up outperforming all other positions.

    To eliminate the problem of slow load times, we wanted to get rid of all the social media scripts (i.e twitter, facebook, google+ etc). Well, you can simply replace the buttons with an image. But we didn’t like the idea because we wanted to show the count as well. We wanted to retain the functionality of the like and +1 button. That is when we decided to replicate the looks by storing the count and using socialite to load scripts when necessary.

    Stats for each post/page/custom post type are updated in post meta fields and cached to keep queries down. Beyond that, the counts are updated asynchronously via AJAX when the transient has expired, so even when the update scripts are pinging the social services for update counts, it still has zero affect on page load times. << Now this prevents us from putting the share buttons on the homepage because it simply wouldn’t update the count. Which post should it update? etc.

    It would work perfectly if your homepage was a static page. Hopefully that makes sense.

    Thread Starter jubot

    (@jubot)

    It does make sense. Though on the website I’m making the consistency of a floating bar on the frontpage and post page would look good. Maybe one day the option to regard index.php the same as a static page? Only one page to +1 and so only one count to update.

    Thanks a lot for taking the time to explain. Loving the plugin and such amazing progress in just a few weeks time.

    cheers.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Frontpage: like index.php, not top post’ is closed to new replies.