How to use shortcodes on theme files to display blocks?

Posted in: Newspaper
Post count: 317

Hi,

I would like to display blocks using shortcodes on theme files (on any template files). I want to show 6 posts from any category but filter them with tags (on block 6) . Here are the settings: http://screencast.com/t/hpbYMRYom

Please provide me the PHP code.

Regards

Post count: 6600

Hi,

Use page builder to create and customize your block then move to classic mode get the shortcode and add it using the do_shortcode function in which template you like.
You can search the forum or the web on how to add the shortcode using this method.

Thanks

Post count: 317

Hi

I used this before:

<?php
 do_shortcode('[vc_row][vc_column][td_block6 limit="5"][/vc_column][/vc_row][vc_row][vc_column   width="1/1"][/vc_column][/vc_row]');
?>

But didn’t work. Any idea?

Post count: 6600

Hi,

Add echo in front of the function. As I said I suggested this method before, you just had to search the forum https://forum.tagdiv.com/topic/get-block3-as-shortcode/#post-15746

Thanks

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