Search Results for 'do_shortcode'

    No search results were found in Documentation!

Results from the Forum
garethl
tagDiv Member

I’m having the same issue. In many forums it suggests adding

add_filter( 'term_description', 'do_shortcode' );

to functions.php however in this case it does not work. Suggestion in other forums is that you can replace 'term_description' with whatever technical name your theme uses for this block…

So I guess we need to know what the theme uses instead of term_description ?

Bogdan B.
tagDiv Staff

Hello,

If you want to add that particular gallery across your whole site, you can simply add it in the header as it;s easier to implement. You will need to use a do_shortcode function in the header file like so:
<?php echo do_shortcode ('your gallery shortcode here'); ?>
Add your gallery shortcode to the code and then place it in the header file:
https://www.screencast.com/t/pKHNC3GWR
It will need a bit of css for a center positioning though.

Thank you!

Bogdan B.
tagDiv Staff

Hello,

You can use the category description if you want to place a text on a category page but you cannot use visual composer blocks on category pages. The categories are not standard pages as they cannot be edited as you would a page. Visual composer does not provide any category editing options. It can be done by altering the category templates though if you have the proper coding skills. You can use a do_shortcode function: https://developer.wordpress.org/reference/functions/do_shortcode/ in the category templates to insert a visual composer block into a category.

Thank you!

salocharly
tagDiv Member

hi,
I am using custom ad 1 2 5. the shorcodes are in place in posts with lists. i placed them manualy on each post. the problem is there is too much posts to change this manualy.

I don’T know what the do_shortcode method is.

i added the cose in the relevant ads in theme panel but nothing shows up.

i really need to fix this, please help.

thanks again

salo

Catalin
tagDiv Staff

Hello salocharly,

Where exactly do you want to use the Custom Ad 1? On homepages, post pages or pages? Provide more information about this so I can be able to provide a more accurate resolution. Above I gave you a method using the do_shortcode method which works as expected which is placed in the right place on your website.

Thanks for your understanding!!

Bogdan B.
tagDiv Staff

Hello,
The adsense code will not work like that in a php file. If you want to place an ad in a custom spot, you will have to use the do_shortcode function
Please insert the ad code in a custom ad spot in the theme panel eg: custom ad 1, and then create a blank page from wordpress. Add an ADBOX element to the page and access classic mode in visual composer so you have access to the tiny mce editor and you can see the sortcodes on that page. The copy the shortcode. it should look like:
[td_block_ad_box spot_id="custom_ad_1"]
Then you can add that shortcode in a do_shortcode function like so:
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
Then you add it to the footer style you use: https://www.screencast.com/t/uyNUuKtG6G

I hope this helps.
Thank you!

Catalin
tagDiv Staff

Hello salocharly,

You should use the Ad Box element from Visual Composer because there you have this option available, like this -> https://www.screencast.com/t/LJjbSgLL If you want to insert the Custom Ad on posts, you should generate the shortcode with Ad Box and then, using the do_shortcode method you can inject this code where exactly you want to add this to your post templates. -> https://www.screencast.com/t/jnILe8S2d The generated shortcode is ->
[td_block_ad_box spot_id="custom_ad_1" spot_title="Advertisment" tdc_css=""]

Hope this helps!

Thanks for your understanding!

22p
tagDiv Member

Hi Simion, sure i do not use visual composer so i think to place this code:
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1"]'); ?>

pstgibson
Participant
#0

1. How can I manipulate three column to display its icon in horizontal line in my mobile device. This display horizontally on desktop. But vertically on mobile device.

2. My ads on header section displays normally on desktop (728×90), but is cut off on mobile device.
I am using a plugin called “WP PRO Advertising System”.
They have different short code which are:
a. Post tag [shortcode][pro_ad_display_adzone id=”2136″]

b. Template tag: <?php echo do_shortcode(“[pro_ad_display_adzone id=2136]”); ?>

c. Iframe tag: <iframe id=”wp_pro_ad_system_ad_zone” frameborder=”0″ src=”http://warrimarket.com/?wpproadszoneid=2136&#8243; width=”728″ height=”90″ scrolling=”no”></iframe>

d. Asynchronous JS Tag

I used the Iframe tag, which worked well for desktop device but cut off on mobile device.
Kindly assist me in getting the full banner size of 728×90 for the mobile device

3. How many plugins does Newspaper 7 support?

Bogdan B.
tagDiv Staff

Hello,

In order to get the pagination above the ad, you will have to remove the article bottom ad and use a custom ad in the post template files and simply place the ad below the pagination:
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1"]');?>
https://www.screencast.com/t/3domcBEg5
You will have to do this for each of the post templates that you use. Each post style has it’s own file.

Thank you!

Catalin
tagDiv Staff

Hello yoluca,

1)Unfortunately, our theme does not have any such an option that allows you to add ads for category pages. If you want to add some ads there, you should edit the category pages and use do_shortcode method, like this ->
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1"]'); ?> -> https://www.screencast.com/t/gBZ5dwc4OJ
2)I have checked all of these modules to my side and the date works as expected. Provide your website so I will be able to provide a more accurate response.

Thanks for the message!

Bogdan B.
tagDiv Staff

Hello,

1) I’m not sure how your title is not centered. Here is how it displays on our end: https://demo.tagdiv.com/newspaper/td-post-lenovo-details-new-computers-that-could-be-heading-our-way-in-2015/
If you want to decrease the size of the container it can only be done with css. Here is an example:
.td-post-template-7 .td-post-header{
height: 415px!important;
}

Add the code in the theme panel-> custom css box.

2) The content width cannot be changed as all the theme elements depend on this fixed width. There is no solution I can provide in this regard

3) The only way of adding anything automatically for all posts at once is by altering the theme files and adding the widget shortcode with a ‘do_shortcode’ function on each post style you use: https://www.screencast.com/t/iyCusKK9yi
as an example: https://forum.tagdiv.com/topic/change-order-ads-on-post-template/

4) The same method as 3. There is no other way of adding content for all posts at once.

5) https://forum.tagdiv.com/how-to-use-visual-composer/

6) Please use this guide: https://forum.tagdiv.com/thumbnails-fix-strange-looking-images-on-blocks/

7) Please provide a swcreenshot of how you set the ajax filter in the back-end and make sure the spoecific category has posts to show.

Thank you!

Simion C.
tagDiv Staff

Hi,

That affects the posts that are using post template style 2, but like I said the bottom sharing by default displays at the bottom of the post, after the via field, tags, post pagination and review – https://www.screencast.com/t/UnV13L8H4qxF If none of those are used, it displays just after the content – https://www.screencast.com/t/juSN26qOtiV or bottom ad if used – https://www.screencast.com/t/pgSO5l6Iz7L0 In the link you provided the sharing appears after your bottom article ad – https://www.screencast.com/t/Hh5wfRinKZ6r and after the comments plugin. Maybe you can configure the settings of the plugin to change the position where it appears. You could try the solution from this topic and use a custom ad instead of the article bottom ad – https://forum.tagdiv.com/topic/sourcevia-above-add/ and place the ad do_shortcode below the bottom sharing.

Thanks

Catalin
tagDiv Staff

Hello Ingente,

Unfortunately, our theme does not have any such an option that allows you to move the article bottom ad to be under the sharing bottom ad, sorry! What can you do is to hide or not use the article bottom ad and insert with the do_shortcode method an ad, which have to be placed under the sharing bottom ad? For example, if you are using the post template style 2, you should edit the loop-single-2.php core file and under the sharing bottom you should insert your desired ad, like this -> https://www.screencast.com/t/Y5kJXj5sJ
<?php echo do_shortcode ('[td_block_ad_box spot_id="custom_ad_1"]'); ?>

Thanks for your understanding!

Catalin
tagDiv Staff

Hello sanny,

Unfortunately, this is the structure of the default shortcodes which the Visual Composer will create for our Slider. You can use this shortcode and insert everywhere you want to our website, using the do_shortcode method, according to our documentation here -> https://developer.wordpress.org/reference/functions/do_shortcode/ If you want to change the structure of this shortcode, please notice that our theme does not have any such an option for that, please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!

Thanks for your understanding!

Bogdan B.
tagDiv Staff

Hello,

This is the default theme implementation: https://www.screencast.com/t/oUUgCl90smuz As you can see the post pagination is above all the other elements. On your end you probably use a plugin that places the content above the pagination.

The news ticker is a block element like any other. It does not ahve any special implementation. You can add it to a page using the add element button in visual composer: https://www.screencast.com/t/TdRllYJVE
None of the theme blocks have any functionality to add them across the whole website. This can be done if you want using a do_shortcode function by altering the theme files though if you have the proper coding skills.

Thank you!

Catalin
tagDiv Staff

Hello samw,

If you want to create a page with all Authors, you should use the Author box from the Visual Composer, like this -> https://www.screencast.com/t/iLIeMR4uj Also, if you want to use a do_shortcode method, switch the VC editor to classic mode and there you will see the shortcode, like this -> https://www.screencast.com/t/MR1qY40xa
Unfortunately, for a single author, the theme does not have any shortcode, sorry!

Thanks for your understanding!

Simion C.
tagDiv Staff

Hi,

1. You could use a do_shortcode containing an ad box with a custom ad code – https://www.screencast.com/t/NJvjNc5ia and enter it in the single file corresponding to your post template file used (post template style 2 – single_template_2.php) from the theme folder, and insert the code in the post structure – https://www.screencast.com/t/CyBEbovSJ with this result – https://www.screencast.com/t/um83ptD49aUh Then you could set some padding top for the ad – https://www.screencast.com/t/MXlbBnvjN This is the shortcode used (you may use a different custom ad if that one is already in use)

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

2. I do not understand exactly what you mean regarding the category page. The structure is the same, a content and the sidebar – https://www.screencast.com/t/0IlE56eALnv both in the theme width https://www.screencast.com/t/U392OBp02Q If it is a background ad it will be displayed in the background of the page.

Thanks

Bogdan B.
tagDiv Staff

Hello,

Unfortunately this specific code will not work from the theme custom js box as all the code is needed. Add it according to the script provider instructions. Try to add the code on a page in a custom js element to test it if it;s at least working properly: https://www.screencast.com/t/tvx6OP3QIVJ
If the code works like that you can then implement it on posts using a do_shortcode function in the php code of the theme files: https://developer.wordpress.org/reference/functions/do_shortcode/

Thank you!

Rony123456
tagDiv Member

Also, does the theme support having infinite article loading? Basically when the user goes to the end of the article, scrolls a little more down, it shows another article.

If that is not possible, I am trying to add the following code:

<?php echo do_shortcode ('[td_block_16 limit="5" td_filter_default_txt="All" tdc_css=""]'); ?>

to the end of loop-single-2 but the lowest i can go is below related articles. How can I make it show below the comment section but above the footer? Also, is it possible to make it full width of the page, so it goes from obe side of the page to the other side, so it is 1/1 width?

Simion C.
tagDiv Staff

Hi,

Well there is a way actually in that case. You could use a do_shortcode to insert a block or big grid in your blog page. First get the shortcode for the element you want – https://www.screencast.com/t/sjVAkPkp4eChttps://www.screencast.com/t/2DeamXzFMKT1 then insert it in the index.php file located in the theme folder – https://www.screencast.com/t/jnuloZiEtqg with this result – https://www.screencast.com/t/NO3pj4kbwdCd
This is the code used

<?php echo do_shortcode ('your shortcode here'); ?>

Thanks

Bogdan B.
tagDiv Staff

Hello,

Well since the plugin is not tested, there is no solution we can provide for the async javascript. As a workaround, you can try to disable the theme lazyload animation as that is the first to break on a js error. Your images will appear again but you will have to test other parts of the theme that will not work properly because of the js error the option creates. You will have to check the site and if you encounter any other errors, you should keep in mind that the async option is on and try to disable it if anything else occurs.
As for the news ticker, you can add it on any at all page as it;s a simple element found in the visual composer element list.
If you want to add it on posts, you can do it from the theme code for every post at one. You will have to add this code:

<?php echo do_shortcode ('[td_block_trending_now tdc_css=""]'); ?>

Add the code on each of the post templates that you use (each post style has it’s own file):
https://www.screencast.com/t/NKMofpKm7z

Thank you!

Simion C.
tagDiv Staff

Hi,

Then you must make your custom modifications in the header-style-10.php file located in the theme folder->parts->header This is the structure of that header style – https://www.screencast.com/t/wXLnXfdjWhyv and you have to insert your code there. If your weather widget has a shortcode, you can use the do_shortcode function and place the code inside the structure like so – https://www.screencast.com/t/S7lSpP68Xh

<?php echo do_shortcode ('your shortcode here'); ?>

Thanks

Bogdan B.
tagDiv Staff

Hi,

You provided a screenshot from the widgets area and I assumed the sidebar is what you are after. If you want to add a widget on posts, you can either add it on each post in particular or on ALL at once using a shortcode implementation. I assume your custom widget has a shortcode so you can use the do_shortcode funstion in the post template files like so:
<?php echo do_shortcode ('your shortcode here'); ?>
https://www.screencast.com/t/Sn1Sumh2d

Thank you!

Simion C.
tagDiv Staff

Hi,

First you have to move your ad code from the article bottom ad and insert it in a custom ad spot – https://www.screencast.com/t/8UFvuTxboHI Then you must edit the corresponding loop single file to the post template style you are using (post template style 2 – loop single 2), from the theme folder – https://www.screencast.com/t/sNN926Vt and insert the code provided below (you can change the custom ad number if it is currently in use elsewhere) in the post structure, like in the example after the post pagination. The result in my case is like this – https://www.screencast.com/t/aHRrFK18c1B the ad in now after the post pagination, and in your case should appear before the ad too reducing the distance between the post content and the pagination. This is the code used

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

Thanks

Viewing 25 results - 276 through 300 (of 1,077 total)