No search results were found in Documentation!
I’ve implemented the new DIV for the wallpaper Ad as suggested from you , here above:
I’ve added this div:
<div class="left">
<?php echo do_shortcode ('[myCode]') ?>
</div>
This causes the wallpaper is rendered before the leaderboard ad.
Our advertiser is asking to make the leaderboard as the first call.
I think I managed this by moving the new piece of code on the bottom of the header file, after this lines.
do_action('td_wp_booster_after_header'); //used by unique articles
?>
Is it correct?
Hi
The share buttons from posts are generated in td_module_single.php: http://screencast.com/t/jXgw8Qpil
You can add social counter at the bottom of the posts by editing the file corresponding with post template used. Here is an example for post template 1: first create a blank page and add on it the social counter and set it how you want to be displayed on posts: http://screencast.com/t/WZwWfSuAsEJi then switch in backend editor, copy the shortcode: http://screencast.com/t/g5B2cvZxx0O2 and paste it in the file where you want to display the counter: http://screencast.com/t/ceFFKIOfeH – http://screencast.com/t/MDTfY0Na
<?php echo do_shortcode('social-counter-shortcode-goes-here'); ?>
I hope this helps.
Thanks!
Hello Tomka,
Please keep in mind that the Visual Composer affects only the content page, what is between main menu bar and footer section. So, if you want to add here some text (daily quote) with Visual Composer, please notice that you can use the Text Block or Text with Title, like this -> http://screencast.com/t/vYov8nII6
So, if you want to add some text under your Logo section, please notice that you will have to alter the code from the header style used by you. For instance, if you are using the header style 10 and if you want to add some text there, you will have to use the do_shortcode method to add this. Please notice that you should add the code in header-style-10.php, like this -> http://screencast.com/t/6NtnqrBRzhy -> http://screencast.com/t/n8JTFag9F
The code is -> <?php echo do_shortcode('[vc_row][vc_column][vc_column_text]YOUR DAILY QUOTE[/vc_column_text][/vc_column][/vc_row]'); ?>
Please notice that all of these processes are considered custom work and we cannot provide this type of service at the moment. So, if you need further customization in this regard and if you are not aware of the steps in this regard, please consider hiring a freelancer/developer to help you.
Thanks.
Hi
You can display Instagram block on single posts using do_shortcode function. You have to edit the file corresponding with post template used and ego out the shortcode where you want the have the widget displayed. Here is an example: http://screencast.com/t/sSIJO057X – http://screencast.com/t/CrFJBCbbhB
<?php echo do_shortcode('[vc_row][vc_column][td_block_instagram instagram_id="envato" instagram_images_per_row="" instagram_number_of_rows=""][/vc_column][/vc_row]'); ?>
The theme does not have an option to display ads between posts from category pages. To achieve that you’ll need some customizations in theme’s core files. We can’t offer customization services at the moment so if you’re not aware of the steps you need to take in this regard please consider hiring a developer or a freelancer to do this for you.
Thanks!
Thank you for your help Andrei, the code work very well.
One problem with out contents is that we have some sensitive categories that we don’t want to show the blocks and infinite load on the single page. Here is the code
<?php echo do_shortcode('[vc_row][vc_column width="2/3"][td_block_2 custom_title="Hoa Kỳ" category_id="61" limit="6" ajax_pagination="next_prev"][td_block_2 custom_title="Little Saigon" category_id="64" limit="6" ajax_pagination="next_prev"][td_block_2 custom_title="Việt Nam" category_id="66" limit="6" ajax_pagination="next_prev"][vc_separator][/vc_column][/vc_row]'); ?>
<?php
$category_detail=get_the_category($td_mod_single->post->ID);//$post->ID
foreach($category_detail as $cd){
$cat_name = $cd->cat_ID;
}
$exclude_current_post = $td_mod_single->post->ID;
echo do_shortcode('[vc_row][vc_column width="2/3"][td_block_13 post_ids="'. -$exclude_current_post .'" category_id="' . $cat_name . '" limit=""][/vc_column][/vc_row]');
?>
Can you please show me how I can exclude those categories out. Example: Cat ID = 1, 2, 3, 4.
Thank you for your support I really appreciated.
Hello gilean,
Please notice that you can use the same way for adding the ads to your post pages but you will have to add the code using the do_shortcode method where you want in your articles.
For example, if you want to display some ads in your article, first of all, you will have to create the code from the Visual Composer, like this -> http://screencast.com/t/jPe8zXDY and then you have to add the following code in the corresponding file with the post template used by you. As an instance, if you are using the post template style 1 you will have to add the code in loop-single-1.php, like this -> http://screencast.com/t/sQATPmLwlhD and the result you should see here -> http://screencast.com/t/s6nnSsQ5
-> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1" spot_title="CUSTOM AD"]');?>
Thanks for your understanding!
Hello,
The ad can be added through the theme files as there is no setting in the theme panel for it. You will have to use a do_shortcode function like so:
$buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
http://screencast.com/t/CdtFm4tuWI6 for the top ad
and add the code here for the bottom ad: http://screencast.com/t/ArLMAzh56m
Thank you!
Hi,
Unfortunately that gets even more complicated as there is no easy way to add specific sliders to specific posts. If you add a do_shortcode, you add one slider for all posts that use style 5. If this is what you need, then i have to suggest hiring a freelancer as multiple conditions and checks have to be added to the code for this to work properly and there is no easy solution I can provide here.
Thank you!
That sound closer to what I want. Would I be able to have multiple sliders with those shortcodes or would it be just one slider for all instances of that Style. For example, I would like to use Style 5 for these posts, and each post would have a different Slider at the top of the page. If I use the do_shortcode Im using only one slider for all of the posts that I have Style 5 activated on. Is there a way to have individual sliders for each post? Like maybe associate the name of the post with the do_shortcode so it would change to the correct slide for each post?
Hello paolo7873,
Unfortunately, our theme does not have such an option and for achieving that is needed to do some additional customizations through code.
So, if you want to add the Ads for your top category page, you have to use do_shortcode method with your Custom Ad. The code is -> do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?> and this you have to add in your category template core file used by you. Below I gave you an example for category template 1 -> http://screencast.com/t/LOwIThu9 Also, please ensure that you have set your Custom Ad 1 -> http://screencast.com/t/hAfyOSQKxt2 In this way, you have to implement on your website.
Hope this helps!
Than kyu for the message!
Sorry but do not works again. 🙁
Someone on previous ticket to reach the result to get to ads (left & right) to the logo make me modify the header-style-7.php file in child theme like this.
<!--
Header style 7
-->
<div class="td-header-wrap td-header-container td-header-style-7">
<div class="td-header-row td-header-top-menu">
<?php locate_template('parts/header/top-menu.php', true); ?>
<?php locate_template('parts/header/top-widget.php', true); ?>
</div>
<div class="td-header-row td-header-header">
<div class="td-header-sp-ads-left">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
</div>
<div class="td-header-sp-logo">
<?php locate_template('parts/header/logo.php', true);?>
</div>
<div class="td-header-sp-ads-right">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]'); ?>
</div>
</div>
<div class="td-header-menu-wrap">
<div class="td-header-row td-header-border td-header-main-menu">
<?php locate_template('parts/header/header-menu.php', true);?>
</div>
</div>
</div>
Tryng to put your code
<?php
if (!is_front_page()){
echo do_shortcode('[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]');
}
?>
before or after some last tags do not works.
Thanks
Hi, i need to insert own adrotate code ad to all articles at the bottom of article description, where are social share icons and tags. I try to insert code to article bottom ad in theme panel, but it doesnt works.
Here is example:
http://www.okmagazin.sk/2016/05/29/som-klasik-panske-modne-trendy/
i try:
<?php echo adrotate_group(2); ?>
[adrotate group=”2″]
echo do_shortcode(‘ad-rotate-shortcode’):
<?php echo do_shortcode(‘[adrotate group=”1″]’); ?>
Please help, thank you.
Hi Andrei
I tried in the child theme as you sho me. The newsticker is showed. But get some error on impagination.
See here
http://www.screencast.com/t/MjOmoNew48Q
The new code of the page is this one
<!–
Header style 7
–>
<div class=”td-header-wrap td-header-container td-header-style-7″>
<div class=”td-header-row td-header-top-menu”>
<?php locate_template(‘parts/header/top-menu.php’, true); ?>
<?php locate_template(‘parts/header/top-widget.php’, true); ?>
</div>
<div class=”td-header-row td-header-header”>
<div class=”td-header-sp-ads-left”>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘); ?>
</div>
<div class=”td-header-sp-logo”>
<?php locate_template(‘parts/header/logo.php’, true);?>
</div>
<div class=”td-header-sp-ads-right”>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘); ?>
</div>
</div>
<div class=”td-header-menu-wrap”>
<div class=”td-header-row td-header-border td-header-main-menu”>
<?php locate_template(‘parts/header/header-menu.php’, true);?>
</div>
</div>
</div>
<?php
if (!is_front_page()){
echo do_shortcode(‘[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]‘);
}
?>
Hello,
Unfortunately for posts, you can only add the revolution slider inside the post content. What you require is adding it above the post content. Unfortunately that cannot be done from the theme settings. You will have to edit the theme files and add your content above the main content area. You can edit the theme files and place your slider with a do_shortcode function like so: http://screencast.com/t/MwXbxox9
Every post style has it;s own file.
You can use this function: https://developer.wordpress.org/reference/functions/do_shortcode/ and add the rev slider shortcode inside it.
<?php echo do_shortcode('YOUR SHORTCODE HERE');?>
Hope this helps.
Thank you!
Hi
You have to edit the file corresponding with header style used and add this code: http://screencast.com/t/u0c4ifVa66Xo
<?php
if (!is_front_page()){
echo do_shortcode('[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]');
}
?>
Thanks!
Hello Icsiaid,
If you want to change the order for your page template, you will have to alter the code from the core file in order to achieve as you wish. First of all, please4 notice that you will have to use the pagebuilder+latest articels+pagination template and then you will have to use the do_shortcode method to add your popular block (set your block to display the popular all time from the Block Settings) in page-pagebuilder-latest.php core file, like this -> http://screencast.com/t/DSd3qCGu and then your will have the Latest Articles displayed on your top of the page and then will be this type of block which you set it by Popular all time sorting on the bottom of the page. The snippet of the code for this example is -> <?php echo do_shortcode('[vc_row][vc_column][td_block_6 sort="popular" ajax_pagination="next_prev"][/vc_column][/vc_row]'); ?>
Hope this helps!
Thanks for your understanding!
Buna
Cea mai simpla modalitate este adaugarea tiker-ului in header. Urmand exemplul de mai jos vei avea News-tiker-ul afisat pe orice pageina sau post: http://screencast.com/t/XuEg8wngEPZ
<?php echo do_shortcode('[vc_row][vc_column][td_block_trending_now][/vc_column][/vc_row]'); ?>
Codul de mai sus trebuie adaugat in fisierul corespunzator cu stilul de header folosit. Eu am exemplificat pentru header-style 1.
Multumeasc.
Hi
The final codes should look like this:
<?php
$category_detail=get_the_category($td_mod_single->post->ID);//$post->ID
foreach($category_detail as $cd){
$cat_name = $cd->cat_ID;
}
$exclude_current_post = $td_mod_single->post->ID;
echo do_shortcode('[vc_row][vc_column width="2/3"][td_block_13 post_ids="'. -$exclude_current_post .'" category_id="' . $cat_name . '" limit=""][/vc_column][/vc_row]');
?>
Thanks!
Hello
I currently have this code in the loop-single.php to show the same category articles.
<?php
$category_detail=get_the_category($td_mod_single->post->ID);//$post->ID
foreach($category_detail as $cd){
$cat_name = $cd->cat_ID;
}
echo do_shortcode('[vc_row][vc_column width="2/3"][td_block_13 category_id="' . $cat_name . '" limit=""][/vc_column][/vc_row]');
?>
How do I combine this code
<?php
$exclude_current_post = $td_mod_single->post->ID;
echo do_shortcode('[td_block_13 post_ids="'. -$exclude_current_post .'"]');
?>
So it won't get conflicted.
Thank you for your support.
Hello
what is the file name that responsible of share buttons ??
i want add this code echo do_shortcode('[whatsapp]');
i remamber its was td_module_single_base but i cant find this code now
Hi
Basically you have to get the post id into a variable using then include it in block’s shortcocde as I did with category id. Your code could be like this.
<?php
$exclude_current_post = $td_mod_single->post->ID;
echo do_shortcode('[td_block_13 post_ids="'. -$exclude_current_post .'"]');
?>
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hello,
I added the “do_shortcode” in the single page template and it work perfectly, my question is that how do I set the banner to display after every 5 articles for infinite load?
Thank you for your support.
Hi,
In this case, it;s exactly as I described above. The mobile theme does not use visual composer so the shortcodes will not work on the mobile theme. You can either remove them from the desktop as well or not use the mobile theme and disable the plugin. This way you will have the old responsive version for mobile. (the new menu will still be present)
If you want to place an ad above the next prev section, you can edit the post template files and use a do_shortcode function (this will also not work in the mobile theme) like so: http://screencast.com/t/7hnVgai7s
You have to do this for every post template that you use.
Thank you!
Hello,
If you would like to place an ad in the category pages, you need to edit the theme files and add a do_shortcode function like so: http://screencast.com/t/DYiP4BqzgV3V
You have to do this for every category template you use as each one has it’s own file.
Make sure you have an ad set in custom ad 1.
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
Thank you!
Hi
1.You can use theme’s custom ad-spots to display your ad above the logo. First you have to place your ad-code in one of the available custom ads. Then you have to edit the file corresponding with header style used and add this code like here: http://screencast.com/t/C9xwScefN
do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
I’ve used custom ad 1 as example for header style 7.
2 Add do_shortcode function in page-pagebuilder-latest.php file: http://screencast.com/t/egUxLLUCs http://screencast.com/t/8lHVlabaDs
Also you will need this css in theme panel > custom code > custom css:
.td-container.td-pb-article-list .td-container-border {
border-bottom: 1px solid #e6e6e6;
}
3. Unfortunately the theme does not have an option to add infinite scroll on posts. To achieve that you’ll need some customizations in theme’s core files. This is a complex task and I can’t provide a solution for the moment. If you need this and you’re not aware of the steps you need to take in this regard please consider hiring a developer to help you with implementation.
Try this css to hide the search cos:
.td-search-wrapper{
display: none;
}
Thanks!