-
Notifications
You must be signed in to change notification settings - Fork 39
Add Google Adsense Link Unit In Header
Majority of bloggers and other content based sites rely on Google Ad-sense for generating revenues through their websites. And it's a good practice to blend the Google ads with the site's content.
Here, in this post, we will be demonstrating the addition of Google Ad-sense Link unit in the header section of the rtPanel child theme, which looks some thing like we have done in the Devils' Workshop.
All you need to do is,
-
Install the rtPanel Theme Framework
-
Install the rtPanel child theme
-
Activate the rtPanel child theme
In the rtPanel child theme, you will find the 'lib' directory. Open the rtp-custom-hooks-applied.php file in the 'lib' directory and create a function something like:
function rtp_google_ad_link_header() {
$google_ad_unit = ' [ADD YOUR SNIPPET FOR THE GOOGLE AD LINK UNIT HERE] ';
echo $google_ad_unit;
}
Next, we create the action at the appropriate hook. Going specific to the current topic, we want the Google Ad Link Unit to be added up in the header section after the logo. So I proceed as:
add_action('rtp_hook_after_header','rtp_google_ad_link_header',1);
There it is! We have successfully added the Google Ad Link Unit in the header. Further blending with the content can be easily handled using CSS.
For any doubt about adding Google Ad Link Unit to your rtPanel theme, ask your questions on our support forum.
rtPanel:
- End-User Documentation
- Developer Documentation
- General
- Customizing Image Sliders in rtPanel Child Theme
- Add Google ad-banner above logo in rtPanel
- Customize rtPanel Footer Information
- Filters in rtPanel
- Integrated SEO plugin in rtPanel
- Create Metabox on rtPanel Child Theme
- Add Google Adsense Link Unit In Header
- Create Custom Taxonomy on rtPanel
- rtPanel:Comments with Gravatar
- rtPanel: Subscribe Widget
- Create Custom Post Type with rtPanel Child Theme
- rtPanel Theme Options ‘General’
- Using rtp_generate_thumbs() function in child theme
- WordPress Debugger 'WP_DEBUG'
- Adding Social Sharing Button to Website: Using Text Widget
- Clickable header in rtPanel child theme
- CSS Checklist for developers
- Implementing rtp-slider in the child theme
- Creating custom page templates in rtPanel child theme
- Child Theme development using rtPanel – Part I
- Child Theme development using rtPanel – Part 2
- rtPanel Developer Program: Standards Guidelines
- rtPanel Developer Program:Test Project
- Removing the default rtPanel Hooks
- Browser Specific Styling
