Put php code in single page

Posted in: Newspaper
Post count: 9

Can you please tell me how to insert this code “<?php echo st_related_posts(); ?>” the theme template so that it calls the necessary function from the plugin in the right place on the page?
I need this code to work between blocks <div class=”td-block-row td-post-next-prev”> and <h4 class=”td-related-title td-block-title”> in single page.
Thank you very much!

Post count: 35449

Hi,

If you need to set that code after <div class=”td-block-row td-post-next-prev”> then you can set the code in wp-content/plugins/td-composer/legacy/common/wp_booster/td_module_single_base.php -> https://www.screencast.com/t/HGW6cQ85 if you want to set it before the <h4 class=”td-related-title td-block-title”> you can set the code in wp-content/plugins/td-composer/legacy/Newspaper/includes/shortcodes/td_block_related_posts.php -> https://www.screencast.com/t/TYJGtvVQxOQ

Thank you!

Post count: 9

Hello! This is yes, but how to insert? When I insert this code <?php echo st_related_posts(); ?> – the site stops working. How to insert it?
Thank you!

Post count: 35449

Hi,

You can set instead the <?php echo st_related_posts(); ?> this code $buffy .= st_related_posts(); -> https://www.screencast.com/t/Vcwo0bAieOHa

Hope this will help you!
Thanks.

Post count: 9

Calin, it’s work!!! Very, very thank you!

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.