Adding an Aweber Lightbox Code To Wordpress Homepage Only

6 replies
Hi Warriors,

I am looking for some technical advice from you guys...

I am looking to add an Adding an Aweber Lightbox Code To my Wordpress Homepage Only. I only want the popup to come up on the homepage, I do not want it to come up everytime someone clicks on a new page.

I have been searching plugins and google but have not got anywhere.

If anyone would be ever so kind could you please let me know how.

Thanks
Andrew:confused::confused:
#adding #aweber #code #homepage #lightbox #wordpress
  • Profile picture of the author Will Perkins
    Originally Posted by Andrew_Cheyne View Post

    Hi Warriors,

    I am looking for some technical advice from you guys...

    I am looking to add an Adding an Aweber Lightbox Code To my Wordpress Homepage Only. I only want the popup to come up on the homepage, I do not want it to come up everytime someone clicks on a new page.

    I have been searching plugins and google but have not got anywhere.

    If anyone would be ever so kind could you please let me know how.

    Thanks
    Andrew:confused::confused:
    Where exactly are you trying to place the Aweber code?
    {{ DiscussionBoard.errors[3116393].message }}
  • Profile picture of the author Andrew_Cheyne
    Hi Will,

    Its a pop up from Aweber, so it doesn't really matter where I place it. I just want to make sure it only pops up on the homepage.

    Thanks
    AC
    {{ DiscussionBoard.errors[3116445].message }}
  • Profile picture of the author auradev
    From time to time I have to publish something to only one page.

    Here is what I do in wordpress.

    Create a custom field called "whatever".

    Then inside your template add this php code:

    <?php if (get_post_meta($post->ID, 'whatever')){
    echo get_post_meta($post->ID, 'whatever', true);
    } ?>

    When you do this, you can put anything into any page in that position using the custom fields.

    Of course you can call whatever whatever you want. I have one for sidebar and footer, in case I need to stick something unique in the side bar or footer for any given page.

    This works great for any type of code snippet that you want on just one page.

    If this works for you, please mark this as helpful :-)
    {{ DiscussionBoard.errors[3116456].message }}
    • Profile picture of the author Will Perkins
      Originally Posted by auradev View Post

      From time to time I have to publish something to only one page.

      Here is what I do in wordpress.

      Create a custom field called "whatever".

      Then inside your template add this php code:

      <?php if (get_post_meta(, 'whatever')){
      echo get_post_meta(, 'whatever', true);
      } ?>

      When you do this, you can put anything into any page in that position using the custom fields.

      Of course you can call whatever whatever you want. I have one for sidebar and footer, in case I need to stick something unique in the side bar or footer for any given page.

      This works great for any type of code snippet that you want on just one page.

      If this works for you, please mark this as helpful :-)
      Definitely is a good solution, you beat me to it. Was looking at saying something similar.

      But if you don't want to mess with code, I'll try to find a plug-in I used to use for this type of thing. If I can find it I'll post it back here for you.
      {{ DiscussionBoard.errors[3116476].message }}
  • Profile picture of the author Andrew_Cheyne
    Hi Auradev,

    I thank you for your reply...

    I am just having a bit of confusion to where things would go.

    <?php if (get_post_meta($post->ID, 'whatever')){
    echo get_post_meta($post->ID, 'whatever', true);
    } ?>

    I am not entirely sure where my aweber code goes and if I need to put anything other than that in there to have it pop up on the homepage. I see that there is a "get_post_meta" -> do I have to add anything to this section?


    Hi Will,

    If you do have a widget that would do this, It would be fantastic...

    Thanks Guys
    AC
    {{ DiscussionBoard.errors[3116531].message }}
  • Profile picture of the author auradev
    Your awebber code goes into the custom fields page on the homepage (inside wordpress admin).

    The code I gave you just pulls whatever you put in that custom field into the rendered page (what the people see).

    So you put that code in your template (the actual wp theme).

    Then put your awebber code in the custom field on the pages you want it to be on.
    {{ DiscussionBoard.errors[3126424].message }}

Trending Topics