[ADDED] "twitter follow button" instead of default "Follow me on twitter" link

  • shubham12u

    #2900

    Hi Syahir,

    It would be great if your replace the default “Follow me on twitter” link in Graphene twitter widget with a twitter follow button.

    It’s pretty nice to see a twitter profile like this, (a pop-up window with a brief explanation of the twitter fellow followed by a follow him prompt 🙂 )

    I don’t know how to implement this universally, but I’ve got a bit of code for those who wanna try it out.

    in functions.php file replace,

    <a <?php if ( $new_window ) { echo 'target="_blank"'; } ?> href="http://twitter.com/#!/<?php echo $twitter_username; ?>"><?php _e( 'Follow me on Twitter', 'graphene' ) ?></a>

    with

    <a href="https://twitter.com/prasannasp" class="twitter-follow-button" data-show-count="true">Follow @prasannasp</a>
    <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

    (replace twitter.com/prasannasp and Follow @prasannasp with your handle)

    I think <script> can be placed in footer.

    Thank you Syahir!

    – Prasanna SP

    plwbiz

    #22518

    I don’t see any place in my functions.php file where twitter is listed to be able to change it from “follow me” to “follow us” .. am a novice at wordpress so be kind 🙂

    Prasanna SP

    #22519

    In the latest version, it is moved to /includes/theme-widgets.php

    You can change “follow me” to “follow us” .. in line number 50

    But, I suggest you use gettext

    https://forum.graphene-theme.com/graphene-support/how-to-change-follow-me-text-on-twitter-widget#post-6298

    Admin

    Syahir Hakim

    #22520

    Great idea! I’ve implemented this in the theme and will be available in version 1.6.1.

    Prasanna SP

    #22521

    I’ve implemented this in the theme and will be available in version 1.6.1.

    Wow!

    Actually I’ve done this in my local copy of the graphene theme. Was about to ask your permission to edit the /includes/theme-widgets.php in Graphene project at Google Code hosting. 🙂

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.