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

  • shubham12u


    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>


    <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



    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


    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



    Syahir Hakim


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

    Prasanna SP


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


    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.