Jump to content

Archived

This topic is now archived and is closed to further replies.

JasonLA

Adwords conversion code on a specific page

Recommended Posts

JasonLA

Hey guys, 

I have read a few other posts about this for Facebook but do not understand hooks.

 

Could someone please explain how to use a hook in easier terms please? I am not very code savvy. I need to know exactly what to enter in and where it belongs. In the hook documentation this is not very clear at all.

 

This is the page I need the code placed on; it's what users are taken to after they submit a form on the page before it: 

 

www.zox.la/custom-confirmation

 

Here is what I have put together from the Docs so far. I put this in my custom CSS and it did not work. 

 

http://forum.pagelines.com/pst/rw/117-hajqg9/

 

Any help is much appreciated!

 

Thanks,
Jason

Share this post


Link to post
Share on other sites
batman

Hi 

You can add a Hook to your function.php in a child theme
 
For example
add_action('pagelines_inside_top_branding', 'google_leaderboard_ad');
 
// function name
function google_leaderboard_ad(){
?>
<div class="leaderboard">Your Code Goes Here</div>
<?php }
 
“pagelines_inside_top_branding” is the hook. This is what determines where your desired content is placed. It's pretty easy to understand since hooks are named accordingly. For example, brandnav_after_nav means that the content you place in this hook will be placed after the brand navigation....
 
“google_leaderboard_ad” is the name given to the content you want to add. You can name it however you'd like, but it's best to give it a descriptive name so that you know what it's for. This name is supposed to go in two places (as shown in the code above).
 
You can see this links to begin:
 
 

Life is too short to remove USB safely ...

Share this post


Link to post
Share on other sites
JasonLA

Thank you Batman! Where do I put the page reference in the code you gave me? I only want the code to show up on this exact page please:

 

www.zox.la/custom-confirmation

 

Thanks!
jason

 

 

Share this post


Link to post
Share on other sites
JasonLA

Sorry Danny, I looked at that page before but just don't understand where to put that code. Could you please help me given the specific information I've given above?
 

Thanks!

Share this post


Link to post
Share on other sites
Danny

We can not provide support for hooks unfortunately, as it is considered advanced customization. However, use this as an example:

 

add_action('wp_head', 'my_custom_function');
  function my_custom_function(){
    if (is_page( 1 )) { ?>
 
      <h1>Boom</h1>
      <h1>Boom</h1>
      <h1>Boom</h1>
      <h1>Boom</h1>
      <h1>Boom</h1>
      <h1>Boom</h1>
      <h1>Boom</h1>
    <?php
  }
}
 
This will display Boom wrapped in h1 tags when the page has an id of 1

Please search our forums, before posting!

Share this post


Link to post
Share on other sites

×