Hi again,
I particulary appreciate the inline article add, and I have one question :
is it possible to set specifics adds for specific post categories ?
For example I would set “this-Add” for categories 1 and 2, and “that-add” for category 3 ?
Would this require special pluging/development ? If yes, I will be happy to know more.
Thnaks in advanced.
Hi
The theme can’t display different ads from the same ad spot. For example you can’t display different article top ads, depending by post’s category, using the article top ad from theme panel: http://screencast.com/t/f1wWSlHX To achieve that are required new ads spots and set of conditions in: td_module_single_base.php which select the ad spot depending by post’s category: http://screencast.com/t/ZTurg2RpfWG7
Please consider that this is a complex task which require many customizations in theme files and also involve good coding skills. If you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer from sites like: http://studio.envato.com/ to do this for you as we can’t offer customization services at the moment.
Thanks for the message!
Thanks for your fast answer Andrei,
On my actual theme, I manage to implement specific shortcodes to specific categories, following the method described here : http://codegrad.hub.ph/inserting-an-ad-between-paragraphs-in-a-wordpress-post/.
To do so, I add the following code on single.php :
********************************************************************
<?php
$paragraphAfter= 3; //shows the ad after paragraph 3
$content = apply_filters(‘the_content’, get_the_content());
$content = explode(“</p>”, $content);
for ($i = 0; $i <count($content); $i++) {
if ($i == $paragraphAfter) { ?>
<!– START OF AD CODE –>
<?php if ( in_category(‘category1’)) { ?>
<?php echo do_shortcode(‘[myshortcode1]’); ?>
<?php } elseif ( in_category(category2′)) { ?>
<?php echo do_shortcode(‘[myshortcode2]’); ?>
<?php } elseif ( in_category(‘category3’)) { ?>
<?php echo do_shortcode(‘[myshortcode3]’); ?>
<?php } else { ?>
<?php } ?>
<!– END OF AD CODE –>
<?php
}
echo $content[$i] . “</p>”;
} ?>
************************************************************************
Now I see that there is indeed a file named single.php on Newsmag, I would like to give it a try.
And my question is : where in all the code on single.php do I have to paste my custom code ?
Thanks in advanced.
Hi
The files system it’s a bit different in our theme. To display different article ads depending by post’s category you need to edit: td_module_single_base.php file and apply your customization for get_content() function: http://screencast.com/t/vKO15qAUj0I which generate the post content. The article ads are rendered here: http://screencast.com/t/ZTurg2RpfWG7
Thanks!