Forums

[resolved] Adding a Twitter Button (7 posts)

  1. johnrbarringer
    Member
    Posted 2 years ago #

    I have a Twitter button I've created as a .png but how can I add it to my header and make it clickable to send to my twitter profile? I want it to sit right above my search box but inside the header image.

    I'm still learning coding and css so any help would be MUCH appreciated.

    acomicbookblog.com

    my twitter

    Thanks!!

  2. Micah Cooksey
    Moderator
    Posted 2 years ago #

    Add the following code where you want your button to appear:
    <a href="http://twitter.com/acomicbookblog"><img title="Follow Me on Twitter" alt="Follow Me on Twitter" src="<?php bloginfo('stylesheet_directory'); ?>/images/twitter-image.png" /></a>

  3. lisaisbell
    Member
    Posted 2 years ago #

    I would also like to do this...but I'm a bit more of a novice, can you be a little more specific about "where you want your button to appear" I want mine to be in the header also, I'm sure I can't just drop that code anywhere in the header file (if only :-). But if I knew where to put the code so it wouldn't cause the button to appear in some weird spot I'm all set.

    Thanks,
    Lisa I.

  4. Micah Cooksey
    Moderator
    Posted 2 years ago #

    Yeah, you'll have to do some coding to include it, partly in your header.php and also in your style.css.

    A link to your site would help immensely.

  5. lisaisbell
    Member
    Posted 2 years ago #

    http://www.whiteoakattic.com

    I want to put the facebook and twitter buttons (small versions of the "stamps" that now appear in the sidebar) up beneath the blog title and tag line so they don't take up so much room, waste space on the site.

    I really am not particular about where they are in the header as long as they look nice, are easy to find and don't get in the way of something else.

    I'm right in the middle of exploring a static home page too - any suggestions/resources I should explore are welcome...I'm trying to house a blog and ecommerce site here together. I don't mind figuring things out but find it exhausting to hunt down directions to each issue that comes up :-)

    Thanks so much,
    Lisa

  6. WPExplorer
    Member
    Posted 2 years ago #

    *johnrbarringer:

    You want to add it to your header right above the search bar correct?

    I suggest doing the following:

    1. Open your stylesheet
    2. Find #header
    3. If not there, add this: position: relative;
    4. Now make the following at the bottom of your stylesheet.css file

    #twitter{
    position: absolute;
    top: 100px
    right: 10px;
    width: 50px;
    height: 50px;
    }

    5. Change the top, right, width, height values to reflect what you need.
    6. Insert the following into your header.php file within the header id.

    <div id="twiter">
    <img src="image location" alt="Twitter"/>
    </div>

    7. Make sure to change the location of your png file

    If this doesn't help you, you can contact me at my site Top WordPress Themes. And I will help you out further.

    or email me at wpexplorer[at]gmail[dot]com

    Same for you lisaisbell.

    I can do the file edits for you if you wish...I hope this helped though!

    ---
    WPExplorer

  7. nickspops
    Member
    Posted 1 year ago #

    I also need some help with this.....

    I am using a custom theme I purchased from ThemeForest.com called Revision. I'd like to add the Twitter and FaceBook icons in the header as well so they don't appear at the end of EVERY post.

    My site is http://www.intelliquestconsulting.us/wptest.

    Any help would be greatly appreciated!

    Thanks,

    James

Topic Closed

This topic has been closed to new replies.

About this Topic