Return to Feature requests

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

Home Forums Graphene WordPress theme Feature requests [ADDED] "twitter follow button" instead of default "Follow me on twitter" link

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2900
    shubham12u
    Member

    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

    #22518
    plwbiz
    Member

    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 πŸ™‚

    #22519
    Prasanna SP
    Member

    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

    #22520
    Syahir Hakim
    Keymaster

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

    #22521
    Prasanna SP
    Member

    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.