Support Forum
Hi, I'm looking to use javascript in the description underneath each forum (google dfp specifically). I've search the forum and not found and answer to do it, only ones to insert the code into the theme template.
I've attached a couple of images to better show where I'd like to place the ads, which I'm hoping you'll be able to help with. I'd appreciate it a lot.
Thanks
you can insert into any number of locations with our hooks or simply by editing the template file of your sp theme where you want it to show just like you would a wp template file in a wp theme... be sure its your own theme to preserve changes on upgrades...
Visit Cruise Talk Central and Mr Papa's World
did you look at: http://codex.simple-press.com/.....the-forum/
it was pretty explicit with examples...
you werent specific on area, but if its after a forum description, it would be in the spGroupView.php or spForumView.php template file..
Visit Cruise Talk Central and Mr Papa's World
I've made some progress, ie got as far as finding the right location in the template. As my ad codes are javascript, and I need to place a different code under each forum those tags don't make a good combination. I think I need to do an if statement such as:
<div id='div-gpt-ad-1369581029840-10' style='width:468px; height:60px;'>
<script type='text/javascript'>
googletag.cmd.push(function() { googletag.display('div-gpt-ad-1369581029840-10'); });
</script>
</div>
I've added another screenshot to show exactly where I'm trying to place my ads.
Any ideas?
Thanks
doesnt look like you are using the code button properly... enter your code, highlight and select the code button... looks like ${}
your image doesnt really indicate where you want to do it... its just a list of forums... so under each one???
so thats spGroupView.php... so probably right before this code:
sp_SectionEnd('', 'forum');
if you want different code per forum, then check the forum id, something like:
if ($spThisForum->forumid == xx) { # your code here }
where you replace xx with the forum id in question... you can make a switch statement or complex if to check all forum ids if needed...
also, if you are entering js, be sure to exit php mode with ?> and then restart it again with <?php
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)