Support Forum
Hi guys, im trying to add am ad code similar to:
<?php if( function_exists( 'pro_ad_display_adzone' ) ) echo pro_ad_display_adzone( 9 ); ?>
to the "post view" so under each post this will appear within the content area.
However it doesn't matter where i try to place the code within the script i always get a blank page on the front end.
am i missing something? (i tried in spTopicView.php)
sorry for the newbi question but usually within Wordpress i can simply drop this line anywhere and it will work.
thanks.
Daniel.
Thanks! worked like a charm.
but what happens when you want to align it? does that means i cant use basic div?
thanks,
Daniel.
You can still use html if you want to. A php file can have both php AND html. If you want to add standard html then you can use a closing php tag before the html and then following the html use a start php tag. Or you can use an echo statement and keep it all as php. So - for example you could use something like:
if( function_exists( 'pro_ad_display_adzone' ) ) { echo '<div class="my_ad_block">'; echo pro_ad_display_adzone( 9 ); echo '</div>'; }
and then you could style your 'my_ad_block' using CSS as usual.
Don't forget - As always we recommend that you create your own SP theme so that any customisation is not lost during a future update. (http://codex.simple-press.com/.....g-a-theme/)
YELLOW
SWORDFISH
|
and just to be complete and follow up with example to Andy's comment about interspersing html and php, would be something like:
if (function_exists('pro_ad_display_adzone')) { ?> <div class="my_ad_block"> <?php echo pro_ad_display_adzone(9); ?> </div> <?php }
the <?php starts a php code section and the ?> ends it... anything outside that is html...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)