Search Results for 'do_shortcode'

Results from the Forum
Catalin
tagDiv Staff

Hello GlanceCompany,

Unfortunately, our theme does not have such an option for this for the posts, but only for the pages if you are using the Visual Composer. So, please notice that you can try to use the do_shortcode method, after you create the button from your Visual Composer, like this -> http://screencast.com/t/Neag3pRJ From there you can customize your button as you like and then, to see the shortcode for it, you will have to switch the Visual Composer to the classic mode, like this -> http://screencast.com/t/rCjQdy5P0RRA In this case, the snippet of the code which you will have to add to your core file, is that ->

<?php echo do_shortcode('[vc_row][vc_column][vc_btn title="Push the button" link="url:https%3A%2F%2Fwww.google.ro%2F|||"][/vc_column][/vc_row]'); ?>

So, please notice that this type of code should added in the coresponding loop single on what post template you are using. For my example, I just use the post template style 1 and the code will have to be added in loop-single-1.php, like this -> http://screencast.com/t/ePJyJxass4 and the result you should see here -> http://screencast.com/t/fc0uQsBVfW0

Hope this helps!

Thanks for your understanding!

Andrei L.
tagDiv Member

Buna

Daca plugin-ul genereaza shrtcode-uri posti folosii functia do_shortcode() pentru a afisa widget-ul de login: http://screencast.com/t/lnt4eyrcF

' . do_shortcode('shortcode-goes-here') . '

Multumesc!

Catalin
tagDiv Staff

Hello sjlabar,

Please provide more details about what type of shortcode you are using and not working. Please ensure that you have the right code in order to use the do_shortcode method.

Thanks.

Andrei L.
tagDiv Member

Hi

This is the code:

[td_block_ad_box spot_id="custom_ad_1"]

<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>

Thanks!

Catalin
tagDiv Staff

Hello frenzygh,

Here is talking about Big Grid 3 feature. So, I have checked your website and I saw that you are using the Blog mode for your website, right? Also, please notice that the Big Grid features are not available for this mode but only if you will use the do_shortcode method for adding the proper code to index.php core file. Also, if you want to switch your page to the Static page you can add this feature using the Visual Composer. For more information about our Grids, please consult the documentation here -> https://forum.tagdiv.com/how-to-use-visual-composer/

Hope this helps!

Thanks for your message!

Andrei L.
tagDiv Member

Hi

Sorry for misunderstanding.
You can insert a custom ad in post content by pasting its shortcode in directly in post editor: http://screencast.com/t/nJ28OzZf You can also use do_shortcode() function in the file corresponding with post template used: http://screencast.com/t/U6kNDks7h

Hope this helps!
Thanks!

Bogdan B.
tagDiv Staff

Hello,

Since this topic, the code has changed a bit. You will have to use a do_shortcode function inside the template files corresponding to each of the post styles that you use.
Hi

– add the ad code in one of theme’s custom ad spots
– create a new page and add an ad-block on it, select in ad-block the custom ad-spot which hold ad’s code: http://screencast.com/t/T9QrVpFshiG
– press the CLASSIC MODE button and copy the shortcode: http://screencast.com/t/09LWoaPqeUA
– edit the file corresponding with the post stylkes that you use and add this line of code:
<?php echo do_shortcode('[vc_row][vc_column][td_block_ad_box spot_id="custom_ad_1"][/vc_column][/vc_row]');?>

In above example I’ve used custom ad 1 but you can use any custom ad spot from theme panel.

Thanks!

Tech Lifestyle
tagDiv Member

I apologize to the large number of tasks but for us it is very important to solve this problem with linking banners.

The final conclusion and the question:
Code (WP Pro adv plugin) of this Samsung TV banner we have implemented in file “header.php” in editor. It worked. Now is not working properly.

Please note that we use the original Newsman theme, licensing plug-ins and do not have any custom works on the site.

Q: Can you tell me the right part (file) of the site where we can implement the code for the current Samsung TV banner to work on position below website header.

This is the code: echo do_shortcode(“[pro_ad_display_adzone id=’48512′]”);

Thanks.

Catalin
tagDiv Staff

Hello brandiejm,

I have checked your website and I saw that you are using the Post Template default, using the Featured Video, right? I assume that you want to add a banner add above that featured video, right? So, if you want to do this, please notice that you will have to use the do_shortcode method to add the banner above the content which has to be added in lopp-single.php file (if you are using the post template default), like this -> http://screencast.com/t/fqDU18xHX and the result you should see here -> http://screencast.com/t/nakIKP3g
Before checking the results, please ensure that you have added your add in Custom Ad 1, like this -> http://screencast.com/t/LGsFNYsLb

Hope this helps and let us know how it goes!

Thanks for your understanding!

Catalin
tagDiv Staff

Hello themesic,

Unfortunately, the theme has not been designed for offers you a way to add some content after the Latest Articles module, sorry! In this regard can be some alternatives for adding this. The first method would be using the do_shortcode which I have presented you above, the second one could be yours with Widget and the third one should be to consider hiring a freelancer/developer to help you for adding some ROW/spot after the Latest module which you can use it every time when you want to add some content in that space.

Hope this helps!

Thanks for your understanding!

Bogdan B.
tagDiv Staff

Hello,

The easier way to do it is with do_shortcode. THe news ticker is a rendered visual composer shortcode so using the function directly in the post template files is easier.
you cna set up your ticker the way you want it on a dummy page like so: http://screencast.com/t/iIKBu50mv and set all of it;s options.
The you can use the shortcode generated in classic mode and text mode: http://screencast.com/t/yLkdt8nsfK
Then you can place a do_shortcode function on each post template and add the shortcode inside: https://developer.wordpress.org/reference/functions/do_shortcode/
<?php echo do_shortcode('[td_block_trending_now style="style2" header_text_color="#dd3333" header_color="#1e73be" category_id="1048" sort="random_posts" limit="20" offset="2"]'); ?>

I hope this helps.
Thanks

Equapio
tagDiv Member

Thanks Bogdan! It seems to work altough i don’t see an ad yet…probably takes a bit.

What’s the code like if i need to display 2 ads? Lets say after the 2nd and 4th exerpt?

Do i need to repeat the if part?

if (is_tag() && ($adcounter == 2)) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘);
}

if (is_tag() && ($adcounter == 4)) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘);
}

Appreciate one last tip here.

Thank you!

Bogdan B.
tagDiv Staff

Hello,

Custom ad positions and conditions must be added in the php files directly as our theme has no such options.
you can use a do_shortcode function and a is_category function to check for the category itself.
Here is an example: http://screencast.com/t/maoyrOlqc

 <?php if (is_category( 'Gadgets' )){
            echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
        }; ?>

Thank you!

Equapio
tagDiv Member

Hi Bogdan,

thanks for your help. I figured that changing the condition should do it. Unfortunately it didn’t work on my end.

On the tag page it returns [td_ad_box spot_id=”custom_ad_6″] after the specified post exerpt.

Here is the code in the loop.php:

if (have_posts()) {
while ( have_posts() ) : the_post();
$adcounter++;
echo $td_template_layout->layout_open_element();

if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, ‘Missing module: ‘ . $td_module_class);
}

echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();

if (is_tag() && ($adcounter == 2)) {
echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_6″]’);
}

endwhile; //end loop
echo $td_template_layout->close_all_tags();

I just added custom ad 6 & 7 but tried it with custom ad 5 too. Also tried it with the Ad inserter plugin which didn’t work either. Their support told me to try it with a php function.

Can you find what’s wrong? Why doesn’t it work? Is there another way?

Really appreciate your help on this.

Catalin
tagDiv Staff

Hello themesic,

If you need to add some things below posts loop in a post, please notice that you will have to use the same method which I have presented you above, named do_shortcode and you will have to place it in the corresponding loop single template with your post template used by you. For example, if you are using the Post Template Style 1, you will need to add that snippet of the code in loop-single-1.php core file in order to achieve good results, like this -> http://screencast.com/t/EIo5hfLusV5 and the result you should see here -> http://screencast.com/t/Fpibc4JGqD

I hope that helps! If is not what you mean, please be more specific, provide more details and also you can send us some useful screenshots so I can understand it better what you mean.

Thanks for your understanding!

Bogdan B.
tagDiv Staff

Hello,
You can place ads on the mobile theme from the mobile theme settings here: http://screencast.com/t/UirT16eMqF
Unfortuanlty there is no ad spot before the latest articles section on the homepage so it will have to be added in the mobile theme files. You can use a do_shortcode function like so: http://screencast.com/t/RkyB7Dnq

Here is the code needed: <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
This will render the ad from custom ad 1 in the mobile homepage.

Thank you!

Bogdan B.
tagDiv Staff

Hello,

If you want to use the above solution for tag pages only, you can simply change the condition fgrom is_category to is_tag like so:

if (is_tag() && ($adcounter == 2)) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_5"]');
}

It worked on my end like this: http://screencast.com/t/TGaJmPwLkxXy

I hope this helps.

Thanks.

Catalin
tagDiv Staff

Hello themesic,

By default, the theme uses the pagebuilder+latest articels+pagination template, like this -> http://screencast.com/t/uZwQrihcY If you want to add some text to the very bottom of the page, under the pagination from latest articles, please notice that you will have to use the do_shortcode method and add it in the page-pagebuilder-latest.php core file. First of all, you will have to create your shortcode from Visual Composer editor, like this -> http://screencast.com/t/07OI4ByF6q -> http://screencast.com/t/AziZGQihBS

<?php echo do_shortcode('[vc_row][vc_column][vc_column_text]I am text block. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.[/vc_column_text][/vc_column][/vc_row]');?>

This snippet of the code should be placed here -> http://screencast.com/t/Rh36Bxkb and the result you should see here -> http://screencast.com/t/3Y9KTRHttw

Hope this helps!

If is not what you mean, please provide more details.

Thanks.

Catalin
tagDiv Staff

Salut RaulCalin,

Foarte important este de retinut faptul ca daca vei face modificari pe viitor in cod in anumite fisiere si daca in urmatoarele update-uri, acele fisiere au fost modificate, tu vei pierde pe acestea, evident. Pentru a nu le pierde, poti folosi Child Theme pentru fisierele care suporta acest lucru. Pentru mai multe informatii despre acest lucru, pot gasi in documentatia noastra aici -> https://forum.tagdiv.com/the-child-theme-support-tutorial/

Te rog sa reti caci Footer template style 4 are un desgin propriu si el nu poate fi modificat din Theme Panel, imi pare rau. Daca vrei sa ai un Footer cu un desgin propriu, va tebui sa folosesti Footer Template Style 5 pentru ca el poate fi customizat dupa cum iti place. Daca vrei sa modifici template-ul de footer 4, tu va trebui sa faci o serie de modificari in td_footer_template_4.php si in td_footer_extra.php, sa adaugi unele optiuni care doresti sa iti apara pe frontend. De asemenea, ca recomandate, se poate folosi metoda do_shortcode pentru a introduce bloc-uri si widget-uri. Dupa cum observi, nu este o sarcina prea usoara iar daca nu esti constient de pasii pe care trebuie sa ii urmezi, te rog sa iti angajezi un freelancer/developer care sa te ajute cu aceasta implementare.

Multumesc pentru intelegere!

Bogdan B.
tagDiv Staff

Hello,

Unfortunately we have not tested wpglobus so we have no idea of it;s functionality. if it works ion a sidebar, probably it has a shortcode. You can use a do_shortcode function in the header file and see if the translation comes up. Here is an example of how to add a shorcode function in a header file: https://forum.tagdiv.com/topic/how-can-i-set-the-revolution-slider-int-header-not-in-content/
The topic refers to a revolution slider shortcode but the method is the same. Replace the rev slider shortcode with your plugin shortcode and try it out.
As for the language, the plugin should have the language translation option. Our theme can be trnalated from the translations panel: https://forum.tagdiv.com/loading-translations/ but i cannot say for sure about the plugin as it’s not tested.

Thank you!

Bogdan B.
tagDiv Staff

Hello,

If you want to place a rev slider element in the header, you will have to use the revolution slider shortcode to do it. You can use this function top wrap the shortcode in so it can be rendered by the theme: https://developer.wordpress.org/reference/functions/do_shortcode/
Here is an example of how to use it:
do_shortcode('[vc_row][vc_column][rev_slider_vc alias="td-blog-cars"][/vc_column][/vc_row]'); ?>
After you create the slider and add it in visual composer on a page, you can see it’s shortcode in text mode in the classic editor (the mce editor): http://screencast.com/t/wGw8sjS5eqLL
After you identify the shortcode and add it to the function, you need to place the whole function containing the shortcode inside the them file corresponding to the header style that you use:
http://screencast.com/t/LNgnFcnGjEtJ

I hope this helps.

Thank you!

Alin [tagDiv]
tagDiv Staff

Hi,

You can use do_shortcode function and place a custom ad above the title and one bellow. Please check this topic as reference – https://forum.tagdiv.com/topic/adsense-ad-below-post-title/

Thanks!

Andrei L.
tagDiv Member

Hi

Basically you will need a function which pass the value from url as a tag in block’s shortcode. Here is an example code which insert a custom value in shortcode:

$v = $_GET['val'];
$block = '';
if (isset($v)){
$block .= do_shortcode('[vc_row][vc_column][td_block_11 tag_slug="' . $v . '" limit="3"][/vc_column][/vc_row]');
}

This code can be used as a function in fuctions.php then you can try to generate a new shortcode for that block using add_shortcode() function. For more details about add_shortcode function check this link: https://codex.wordpress.org/Function_Reference/add_shortcode After you generate the shortcode can be used in visual composer. This link may also help: https://codex.wordpress.org/it:Riferimento_funzioni/do_shortcode

Note that you will need some codeing skills in order to complete this task. I’ve offered just a basic example above but if you still need guidance on this or 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 as we can’t offer customization services at the moment.

Thanks!

Bogdan B.
tagDiv Staff

Hi,

If you require the recent articles to be displayed on every post under the content, you can use a do_shortcode function and chose one of the content blocks. For example, you can use a block 4 limited to let’s say 15 articles. You can create the block the way you want the settings on a dummy page. After you create the block and set it up, once you click classic mode you can see the shortcode. For my example this was the resulting shortcode:
[vc_row][vc_column][td_block_4 custom_title="Latest articles" limit="15"][/vc_column][/vc_row]
You can use this block on a post by adding it to the post template files with a do_shotcode function like so:
<?php echo do_shortcode('[vc_row][vc_column][td_block_4 custom_title="Latest articles" limit="15"][/vc_column][/vc_row]'); ?>
http://screencast.com/t/aGMv6ov5
You will have to add tbis code for each of the post styles that you use on your site. Each post template has it’s own file.

I hope this helps.
Thank you!

Bogdan B.
tagDiv Staff

Hello,

If you want to add a shortcode inside the post content you need to edit the theme files of each of the post templates you use on your site. You can use a do_shortcode function: https://developer.wordpress.org/reference/functions/do_shortcode/
Here is an example of how to do it: https://forum.tagdiv.com/topic/html-code-after-the-content/
you can use do_shortcode like so:
do_shortcode('your shortcode here'); ?>

Thank you!

Viewing 25 results - 426 through 450 (of 1,077 total)