I need to explain better..:-)
I use theme style 7 header, full header logo, but I dont use a logo, instead I have designed a full width header advertisement banner including a logo. Showing through theme panel /ads/your header ads.
Now for some pages, I would like to have a different/or no header ad-banner. I am not asking how to create a blank page, but a normal page, just with another header ad-banner or none..:-)
If a specific page could use a custom ad as HEADER ad maybe, but how to get this to the specific page, I need some advise plaese.
Thank You
Hi
To load a different banner for a specific page you can add a condition in the file corresponding with the header style used. For example if you’re using header style 7 the file that must bee edited is header-style-7.php and the code should look like here: http://screencast.com/t/ryRhn07c25
<?php
if (is_page(page-id)){
echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
}
else{
locate_template('parts/header/ads.php', true);
}
?>
Replace the page-id with the numeric id of the page where you want to load a different ad. To get the page id follow this link: http://screencast.com/t/9V7zgx6WK
I used custom ad 1 in this example but you can use any of the custom ads, just update the number from shortcode. Ex: for custom ad 4 the shortcode will be [td_block_ad_box spot_id="custom_ad_4"]
If you want to hide the logo on a specific page just add this condition here: http://screencast.com/t/iT9p861gnJ
<?php
if(!is_page(page-id)){
locate_template('parts/header/logo.php', true);
}
?>
Let me know how it goes.
Thanks!
-
This reply was modified 10 years by
Andrei L..
SO, my Website went BLANK, when I did that, I think I did it exactly, like You showed. But however, I did copy the header style and copied it back after the web went blank, so my web is running.
Could You please assist me getting that specific code into the header style, obviously, I did something wrong..
?
Hi
The code that i provided it’s tested and works fine, so please make sure you added it properly, like here for example: http://screencast.com/t/yJbELHQRI7o I just replaced the page-id with the numeric id for one of my pages.
I can’t offer any further assistance regarding the code implementation but following the above instruction you should be able to implement it. Also I am not sure at what line 36 are you referring so please provie a screen pointing to the required file.
Please note that we’re not available for custom services at the moment so if you need a different implementation and you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer to do this for you.
Thanks!