Home User profile
tagDiv Member
This user did not write anything. So we are just showing here some random text to make the profile page look nice :)
jciview
tagDiv Member

Thanks for your help but maybe I haven’t explained my problem.

I need to render 2 different displays depending on the current post’s category. Here’s part of the td_module_3.php code with my comments:


<div class="<?php echo $this->get_module_classes();?>">
<div class="td-module-image">
<!-- IF CURRENT POST IS IN RECIPE CATEGORY -->
<?php echo $this->get_image('td_324x324');?>
<!-- IF CURRENT POST IS NOT IN RECIPE CATEGORY -->
<?php echo $this->get_image('td_324x235');?>
<?php if (td_util::get_option('tds_category_module_3') == 'yes') { echo $this->get_category(); }?>
</div>
<?php echo $this->get_title();?>
</div>

I’m not sure how to pull the data like post ID from the “$this” array and check to see if it’s top parent category is “recipe.”

jciview
tagDiv Member

Thanks for your reply.

I know where to activate it… and it’s activated. However, clicking “load more” button doesn’t seem to use the same php template as Block 5 (td_module_3.php).

Here’s the page with the problem:
https://www.farmflavor.com/recipes/

jciview
tagDiv Member

Turns out I had some corrupted Firefox files. If anyone else has same problem for some reason, just refresh Firefox.

Thanks for your help.

jciview
tagDiv Member

I’ve used 4 different ad servers with Newspaper theme and all of them have worked. Most every ad server requires 2 bits of code:

  1. The call script to the ad server. Usually this will go in the header.php file of the theme/child theme or you can ad it in custom code > advanced from the theme panel.
  2. The ad display code, which you can place in the newspaper theme panel > ads section or in widgets, etc…. where ever you wan the actual ad to display.

Ads won’t display without both of those elements on the page.

jciview
tagDiv Member

I found a solution for my specific case involving inline ads. I was able to move td_module_single_base.php to my child theme and modify the $tds_inline_ad_align section with my php variables. I trigger the “case” by putting a comment in the theme ad box. <!– Inline ad code in td_module_single_base –>

jciview
tagDiv Member

I agree that offering some sort of PHP enabling would be beneficial. In our case, we’ve used several services like OPenX, SmartAdServer, DFP, etc. combined with PHP for ad targeting specific states, regions, categories, tags, page ID’s, etc. Newspaper’s ad system works great for certain kinds of ad setups but not for others.

jciview
tagDiv Member

Thank you. Somehow, I the call to locate_template('parts/search.php', true) went missing.

I appreciate your quick response.

jciview
tagDiv Member

Sorry… just found problem after comparing to another theme license. My permalink structure didn’t include a trailing slash, which seemed to be the problem.

Thanks again for a great theme!

jciview
tagDiv Member

I found a way by just eliminated the top posts from each category and adding the shortcode to the proper template in my child theme:

<?php echo do_shortcode('[vc_row][vc_column][td_block_big_grid_3 category_id="' . $thisid . '"][/vc_column][/vc_row]'); ?>

Viewing 9 posts - 1 through 9 (of 9 total)