Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #347511

    Hi,

    My page: http://www.superbusyfit.com
    I am looking to add a paypal support button at the top right of my header.

    This previous support thread was I thought answering my need, so i gave it a go:
    https://kriesi.at/support/topic/how-can-a-add-a-hyperli:ked-image-at-the-top-of-my-newscast-blog/
    I want more or less the same layout as he has on http://stubstory.com

    Here is what I have tried. This code was added at the end of parent theme Header.php – and this is where I am probably wrong but couldn’t find the line to add it under (mentioned in previous thread)

    I have also added to the end of the css file
    .paypal_support_button {position: absolute;top: 60px;right: 30px;}

    Right now the css is still there as it does not cause any trouble but i took the code to be added to header.php out as it was adding a ? kind of image at the bottom left of the header..
    I have tried moving the logo to the left +facebook social link to teh left as well of the header but it did not work. I just have everything back centered now just for layout purposes.

    Also see in private content le paypal link I wan to be added- as i do not see how previous piece of code in the header can add something else than the picture once it works?

    Thank you for your help once more

    Val

    #347611

    Hi valmil!

    Add this to the bottom of your functions.php file in your Enfold/Enfold child theme folder

       function add_paypal_button_script(){
    
            $paypal_button = "<a class="paypal-donate-button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=65CRVDD3LGLZN">Donate to Paypal</a>";
            echo $paypal_button;
            
        }
        add_action('ava_main_header', 'add_paypal_button_script');

    Add this to Quick CSS or custom.css:

    #header_main .paypal-donate-button{
      
      /*Add your button styles here*/
      float: right;
      margin-right: 100px;
      
    }

    Tweek the style to place the paypal button in the right position.

    Cheers!
    Arvish

    #348291

    Hi Arvish,

    I got what I now understand the “WordPress White Screen of Death” as soon as I went to add you code to the functions.php.

    This was this morning (over 12hours ago) and I first thought it was a server issue. left it rest then went back to check…
    Then I did some research and found this page from WP:
    http://codex.wordpress.org/Common_WordPress_Errors

    This made me realise what I was doing went that happened…first time I get that white page! It looks like your code is not working properly…and we would need another solution.
    Could you please help me to fix this as I am afraid to mess thing up more than they are?

    Please note I have a recent copy of the site xml (less than 24hrs before the crash) so it is fine ;-)
    I will send you my ftp in private.

    Thank you for helping me fixing this, I have no clue how to do this.

    Thank you very much.

    Valerie

    #348604

    Hey!

    We changed the code a bit. Please get it here: http://pastebin.com/247SuptA

    Regards,
    Ismael

    #348642

    Hi Ismael- thank you for your answer- but as I cannot access my WP due to this error where do I go ?

    I am not a coder or developer, and it is the first time I get a white page like this and do not want to mess things up.
    if I try to access it with ftp (filezilla)> website folder>wp-content>themes>enfold child>functions.php I cannot open the file.
    How can I fix it and have it back where it was????

    this is a really messed up :-((
    My page has been done for 2 days now and I cannot work on it. :-(((

    How can I access my WP again?
    Please heeeeelp
    Thank you.

    Valerie

    #348921

    Hey!

    I hope you have made a backup. If yes, just delete everything via ftp and upload your backup files. Don’t forget to also upload the backup of your database.

    Best regards,
    Andy

    #349105

    Hey guys!

    I had to upload enfold child again- i did (finally!) manage through my host ftp interface – for some reason filezilla doesn’t let me access any file, well anyway doesn’t matter, found a way around…
    Back to this thread issue…

    Ismael, could you resend the code you had modified…the link you pasted above is not active anymore :-(
    thank you.

    #349354

    Hey!

    Please use this:

    function add_paypal_button_script(){
    
    	$paypal_button = '<a class="paypal-donate-button" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=65CRVDD3LGLZN">Donate to Paypal</a>';
    	echo $paypal_button;
    
    }
    add_action('ava_main_header', 'add_paypal_button_script');

    The only mistake on the code is the single quotation.

    Best regards,
    Ismael

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.