WordPress.org

Ready to get started?Download WordPress

Forums

How do I add a Paypal icon to the header section? (4 posts)

  1. FellowDC
    Member
    Posted 3 years ago #

    Hi, I was wondering if anyone knows how to add a Paypal icon to the header section of the website. I copied the code from icon maker on the Paypal website, but I can't seem to find a place to insert it. I'd like it to be at the far right side of the header.

  2. mdevaney
    Member
    Posted 3 years ago #

    1. Login

    2. Go to Appearance > Editor

    3. Choose your theme from the drop down on the right and click select

    4. The first file that loads up most likely is your style.css file make sure the file is editable, either has a blue button that says Update File or has text that says "You need to make this file writable before you can save your changes. See the Codex for more information."

    5. If you see the message that says you need to make this file writable, then follow the link to the Codex, and follow those directions. http://codex.wordpress.org/Changing_File_Permissions

    6. If you see the blue button that reads "Update File" for style.css then place the following inside of that file, at the bottom.

    Place in your themes style.css file

    #paypal {
         position: fixed; // makes sure it stays in place
         top: 10px; left: 0; // places it 10px down and all the way right
         z-index: 10; // make sure its on top of everything else
         background: transparent; //
    }

    7. Great, now you need to find your header.php file and do the same but with the following code within the <head></head> tags:
    Place in your header.php file

    <div id="paypal">
       REMOVE THIS TEXT AND INSERT PAYPAL TEXT HERE
    </div>

    you might want to check out the following sites for more info on how everything works:

    CSS: http://www.w3schools.com/css/
    HTML: http://www.w3schools.com/html/
    PHP: http://www.w3schools.com/php/

  3. FellowDC
    Member
    Posted 3 years ago #

    Thanks, I appreciate that you took the time to post this.

    But there is a problem: after inserting what you specified, the Paypal icon is positioned at the upper left hand corner of the screen, is transparent, and stays in the same position as you scroll down.

    Sorry, I'm not well versed on this how this works yet.

  4. oliviaok
    Member
    Posted 3 years ago #

    hi i tried to follow your method but i recieved error on line2 in header.php

    http://pastebin.com/SmadAgFW

    is there something im doing wrong

    olivia

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags