Need to add embed code to Buddypress register page

Hello,

I'm just trying to figure out how I can and this embed code into my register.php page? I want to add it near the top before the signup form but I just can't figure out how to get into the file and change it.

<iframe src="http://www.traffic-zombie.com/en/members/referral?campaignID=398&backgroundColor=%23000&textColor=%23fff" width="100%" height="1100" frameborder="0" style="border: 1px solid #000;"></iframe>

Can someone help?

Thanks
Deborah

  • Mason
    • DEV MAN’s Sidekick

    Hiya Deborah!

    First off, welcome to WPMU DEV! Glad to have ya. :smiley:

    If you're using the BP Magazine theme, then I'd check out the following file:
    bp-magazine>registration>register.php

    You should be able to insert the code directly. If you're familiar with HTML you'll see where it begins the content div and the registration form. For instance, inputting that code on line 9 will put it directly above the registration form.

    Let me know if you need further assistance and again, welcome!

  • debbrancheau
    • WPMU DEV Initiate

    Hey James,

    Thanks for helping. I think I already tried that but I know there are like three register.php files related to bp-magazine, so let me tell you where I went and what I did.
    1. Went to wp-content >> plugins >> buddypress >> bp-themes >> bp-default >> registration >> register.php
    2. Added the code.
    3. Saved and uploaded it.

    Page still looks the same and I've cleared the cache.

    Also, I tried this:

    1. Went to wp-content >> themes >> bp-magazine >> registration >> register.php
    2. Added the code.
    3. Saved and uploaded it.

    Didn't work.

    Thanks,

    Deb

  • Mason
    • DEV MAN’s Sidekick

    Hiya Deb,

    That is odd. I did a test install using the instructions I provided above and the iframe loaded correctly above the install form.

    You definitely want to put it in the themes folder's reference to register.php. Where are you placing the code?

    Thanks!

  • debbrancheau
    • WPMU DEV Initiate

    Hey Mason,

    So, I found the file, edited it, saved it and then tried to upload it but while Filezilla says that it was successfully uploaded, on the server size of Filezilla the date matches but the file size does not. On my computer the file is 15130kb and on the server it's 14777kb (which accounts for the extra code). The file attributes are all set to 755 so it should be uploading . Go any ideas?

    Thanks,

    Deb

  • Mason
    • DEV MAN’s Sidekick

    Hiya Deb,

    That is an odd one. Can you actually view the file on the server and verify that the code is absent? Can you log in to your server (through cPanel or similar) and try taking a look at the file that way? It'll help confirm whether firezilla is giving us correct information.

    Thanks!

  • Richie_KS
    • HummingBird

    hi
    just add this to functions.php

    function custom_reg_embed_code() { ?>
    <iframe src="http://www.traffic-zombie.com/en/members/referral?campaignID=398&backgroundColor=%23000&textColor=%23fff" width="100%" height="1100" frameborder="0" style="border: 1px solid #000;"></iframe>
    <?php }

    add_action( 'bp_before_register_page', 'custom_reg_embed_code');

    you can change the hook to bp_after_register_page also...

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.