Brilliant – thank-you!
(von: drwhom)
Hier noch 13 weitere Ergebnisse dieses Threads:
Different header and sidebar ads for a single page
17. Feb. 2010 (von: drwhom)
Hi Joern, I've got a vague feeling that you might have helped me with something similar before but I can't find the answer. Essentially, all I want to do is change a single page so that it has a different…
Re: Different header and sidebar ads for a single page :: Reply by Joern
17. Feb. 2010 (von: Joern)
Put a conditional tag around the different adds, like this:<?php if ( is_single('Favourbrook') ) { ?>do Favourbrook add here<?php } else { ?>do any other stuff here<?php } ?>that's just for this single post, more conditional tags see ... Weiterlesen…
Re: Different header and sidebar ads for a single page :: Reply by drwhom
17. Feb. 2010 (von: drwhom)
The forum's being weird! Weiterlesen →
Re: Different header and sidebar ads for a single page :: Reply by drwhom
17. Feb. 2010 (von: drwhom)
Let me try again as it seemed to take that post - thank-you- notification is working great- does the conditional code go in sidebar.php and header.php? Weiterlesen →
Re: Different header and sidebar ads for a single page :: Reply by master
17. Feb. 2010 (von: master)
I see your reply..now changed to weird..____________________you find me on Google+, Twitter and Facebook Weiterlesen →
Re: Different header and sidebar ads for a single page :: Reply by master
17. Feb. 2010 (von: master)
anywhere, in header.php make space under your add, paste the code as is and look if you see the text 'do Favourbrook add here' or 'do any other stuff here' under your head.If yes it's working and you put your…
Re: Different header and sidebar ads for a single page :: Reply by drwhom
18. Feb. 2010 (von: drwhom)
For some reason I don't think the forum likes me posting code... Weiterlesen →
Re: Different header and sidebar ads for a single page :: Reply by drwhom
18. Feb. 2010 (von: drwhom)
I'll try posting a very small section:<a href="<?php echo get_option('home'); ?>/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/logotrial3.jpg" width="410px" height="110px" alt="" /></a> <div id="tagline"><?php bloginfo('description'); ?></div> </div> <div class="right"><?php if ( is_single('Favourbrook') ) { ?><a href="http://www.iamstaggered.com" onClick="javascript: pageTracker._trackPageview('/outgoing/www.designaventure.co.uk');"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/banners/testadvert.png" alt=""…
Re: Different header and sidebar ads for a single page :: Reply by master
18. Feb. 2010 (von: master)
it seems not to recognize the is_singleyou could try with the ID of this post is_single('17') 17 sould be your IDor with the page slug is_single('favourbrook')I hope we talk about a single post? that's not a page or category, right?If…
Re: Different header and sidebar ads for a single page :: Reply by drwhom
18. Feb. 2010 (von: drwhom)
JOERN/MASTERADMIN I BLOODY LOVE YOU. THAT IS ALL. Ahem, yes, it was a page, not a single post. Whoops. Weiterlesen →
Re: Different header and sidebar ads for a single page :: Reply by drwhom
8. Mrz. 2010 (von: drwhom)
Hi Joern, More on this I'm afraid - I can't quite seem to format the tags for a series of conditional tags. What I want is different sidebar ads depending on the page (e.g. some will be different ads for…
Re: Different header and sidebar ads for a single page :: Reply by master
8. Mrz. 2010 (von: master)
you got a typing error "elseif <?php if"this should work:<?php if ( is_page('Favourbrook') ) { ?><a href="http://www.iamstaggered.com" onClick="javascript: pageTracker._trackPageview('/outgoing/www.designaventure.co.uk');"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/banners/testadvertsidebar.png" alt="" width="300px" height="250px" /></a><?php } elseif ( is_category('randallmurrow') ) { ?><a href="http://weddings.randallmurrow.com/"><img src="<?php echo get_option('home'); ?>/wp-content/themes/arthemia/images/banners/randallad.jpg" alt=""…
Re: Different header and sidebar ads for a single page :: Reply by mlynn
30. Jun. 2011 (von: mlynn)
You could also use a plugin like the Graceful Sidebar Plugin. This simple plugin enables you to customize your posts or pages with unique sidebar content.Enjoy!Mike Weiterlesen →