WordPress.org

Ready to get started?Download WordPress

Forums

Twitter Widget Pro
[resolved] Move follow link (3 posts)

  1. chrisjlebron
    Member
    Posted 1 year ago #

    I'd like to move the follow link to the beginning of the list of tweets, and add more text in front of it (specifically "Follow Us"). I'm setting this up for a client, so I want to attempt to tap into the classes or filter hooks, and extend the plugin, rather than overwrite anything. I've been able to remove the twitter button styling & follow counts with the provided filter (and help from this post), but I don't see any way to change it's position without overwriting or forking.

    Anyone give me some advice here? I'd prefer to do this in PHP rather than screwing around with the DOM in JS, so... you know... that.

    Thanks.

    http://wordpress.org/extend/plugins/twitter-widget-pro/

  2. Aaron D. Campbell
    Member
    Plugin Author

    Posted 1 year ago #

    You could just set the widget to not show the button, and use the 'twitter-widget-title' filter to add the button up by the title.

    Alternatively, since the follow button has a class of 'follow-button' and the widget itself has a class, you could use some CSS to do it. Add position:relative to the widget as well as some padding-top. Then use position:absolute and top:0 on the follow button div. You could also use .follow-button:before{content:"Follow us"} to add the content before the button.

  3. chrisjlebron
    Member
    Posted 1 year ago #

    Yeah, I would've liked to have used the 'twitter-widget-title' filter, but I couldn't hard-code the twitter link since the client wanted to change it according to whatever event they were holding. Is there a way I could have added the button here without hardcoding the link?

    Also, I appreciate the CSS tip, but playing with the CSS or JS was just too hacky for this project—a responsive site, built for a client who doesn't want to deal with developers (ha).

    I ended up convincing everyone that the link was fine where it was, at the bottom, so we kept it there.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.