I want to show ads after comment box or before similar article box. So, I add a php code <?php if ( method_exists(‘q2w3_inc_manager’, ‘manual_inc’) ) q2w3_inc_manager::manual_inc(4); ?> in single post.php before locate_template(‘loop-single.php’, true);
comments_template(”, true); .
But after adding code , there is no gap between column container and sidebar.
Pliz help. I want to show ads after comment box and before similar article box.
Hi,
If you want to have the ad after the comment template you need to add it after the comment template in single.php file which is located in the root of the theme: http://screencast.com/t/GC4BT2hV0g and use just this code without thye php tags:
if ( method_exists('q2w3_inc_manager', 'manual_inc') ) q2w3_inc_manager::manual_inc(4);
To add it before similar articles you need to add it here: http://screencast.com/t/wLbsLKwsYEi and you need to add the php tags this time:
<?php if ( method_exists('q2w3_inc_manager', 'manual_inc') ) q2w3_inc_manager::manual_inc(4); ?>
Hope this helps!
Thanks
-
This reply was modified 11 years by
Lucian.
Yes, I have done and test It. But For, To have ads after the comment template, I have used your said code and ads are not showing if I removed the php tags:
And For, To add ads before similar articles, I have done what you said , ads are showing but no gap is there between post column container and sidebar coulmn.
Before adding ads code, there is gap.
Pics:
After adding code , there is no gap
Pics:
Before adding ads code, there is gap.
Pics: http://www.screencast.com/t/WClqjgZzF
After adding code , there is no gap
Pics: http://www.screencast.com/t/gkGfwuD8N
with reference to my website url:
http://www.onefilmy.com/news/bollywood-news/hindutva-uses-morphed-kareena-kapoor-image-campaign-love-jihad.html
Hi,
This happens because of this tags which are added to the sidebar: http://screencast.com/t/0uzCk3Uh0Ug and if you remove them live from the browser you will notice that this gets fix so please make sure you add this right and also that you add the right code to display ads via Q2W3 Inc Manager as I’ve noticed here that you need more than the code you’ve mentioned above to call and ad: https://wordpress.org/support/topic/plugin-code-insert-manager-q2w3-inc-manager-twenty-eleven-adding-sidebar-possible so make sure you use the right syntax for this.
Thanks
Hello, I am really confused with this newspaper theme. Where to edit and where to make change to show ads in my said place ?
The Plugin give only this code “<?php if ( method_exists(‘q2w3_inc_manager’, ‘manual_inc’) ) q2w3_inc_manager::manual_inc(4); ?>” to show ads where you want to show ads. I have no problem with other theme.
I also confused with what you described. If possible pliz , tell me exactly what to add , where to edit or make change .
Pliz test yourself the newspaper theme with the plugin to show ads in before similar article and after comment template . And after working fine, Pliz help me.
Hi,
First you need to customize your ad: http://screencast.com/t/T8HSBeKabQ
Then get the line from there and add it to your post template file like this: http://screencast.com/t/il4F2hfX9Xi5 with the id of your customized ad: http://screencast.com/t/ZJq5e3yXDy9
I have also tested this and haven’t had any layout issues when using it.
Thanks
Hi , I am unable to customize ads code and show ads without any issue. So, I am giving you my ads code . Pliz solve my problem with my giving ads code. I want to show ads in two different place i,e Before similar article box and after comment box. Just watch my screenshot fully. http://www.screencast.com/t/58g9V9Ani
Ads code is here :
<!– MarketGidComposite Start –>
<div id=”MarketGidScriptRootC12864″>
<div id=”MarketGidPreloadC12864″>
Place your ad here<br> Loading…
</div>
<script>
(function(){
var D=new Date(),d=document,b=’body’,ce=’createElement’,ac=’appendChild’,st=’style’,ds=’display’,n=’none’,gi=’getElementById’;
var i=d[ce](‘iframe’);i[st][ds]=n;d[gi](“MarketGidScriptRootC12864”)[ac](i);try{var iw=i.contentWindow.document;iw.open();iw.writeln(“<ht”+”ml><bo”+”dy></bo”+”dy></ht”+”ml>”);iw.close();var c=iw[b];}
catch(e){var iw=d;var c=d[gi](“MarketGidScriptRootC12864″);}var dv=iw[ce](‘div’);dv.id=”MG_ID”;dv[st][ds]=n;dv.innerHTML=12864;c[ac](dv);
var s=iw[ce](‘script’);s.async=’async’;s.defer=’defer’;s.charset=’utf-8′;s.src=”//jsc.mgid.com/o/n/onefilmy.com.12864.js?t=”+D.getYear()+D.getMonth()+D.getDate()+D.getHours();c[ac](s);})();
</script>
</div>
<!– MarketGidComposite End –>
-
This reply was modified 11 years by
ningthouja.
Ads code given in above is incomplete . So, Here is the ads code : https://drive.google.com/file/d/0BxMxoToAymmNMEszQzNSM2t3M1E/view?usp=sharing
I have used this ads code in the Plugin with manual as option.
So, Help me with this code.
-
This reply was modified 11 years by
ningthouja.
Hi,
Please add your code in Theme Panel > Ads > Custom ad like this: http://screencast.com/t/Qg2O2uBdtdu
After that you can use do_shortcode function to place it in template:
-in loop-single.php add <?php echo do_shortcode('[td_ad_box spot_id="custom_ad_2"]'); ?> before related posts like this: http://screencast.com/t/1IhB9MmYQlX
-in single.php add echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); after comments like this: http://screencast.com/t/nSsLlE92gYQ
Result: http://screencast.com/t/JqIpqZ5r
I don’t know why, but your code is loaded only once.
Hope this helps!
-
This reply was modified 11 years by
Alin [tagDiv].
-
This reply was modified 11 years by
Alin [tagDiv].
-
This reply was modified 11 years by
Alin [tagDiv].
