Search Results for 'do_shortcode'

Results from the Forum
Catalin
tagDiv Staff

Hello Vanesafp,

1)Our theme does not have any such an option that allows you a way to add there your desired ad, sorry! If you want to do this, you should edit the theme core file and add the do_shortcode method for this. For example, I have noticed that you are using the single post template style 1. So, you should edit the loop-single-1.php core file and add there this code, like this -> http://screencast.com/t/6GkNnaBBPwWT The snippet of the code which have to be added in that place should look like this -> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?> Also, ensure that you have added your Ad code here -> http://screencast.com/t/pAnPE5D1I

Hope this helps!

Thanks for the message!

dmimedia
tagDiv Member

I have done the do_shortcode method and i used block 15.
Question: but how can i have the styling the same as the default related articles? My images are now to small and y have to munch white space. like this ->http://prnt.sc/djwae1

Another alternative for you would be to disable the Related Posts block and add in that section with do_shortcode method a simple block which you can filter it by latest articles from entire site and your problem will be solved. Also, you can give the similar name to your block, like Latest Articles. As a hint, you can see here an example to post template style 1, like this -> http://screencast.com/t/Ns3rVIIf

Catalin
tagDiv Staff

Hello m0re,

If you want to add a banner ad to the bottom of every post, you should use the Article Bottom Ad from Theme panel, like this -> http://screencast.com/t/DhN8lfvZ Also, if you want to add more than one Advertisement here, you should edit the post template core file used by you and there you should use the do_shortcode method. For example, if you are using the post template style 1 you should edit the loop-single-1.php, like this -> http://screencast.com/t/Wfrwhqhcivz and the result you should see here -> http://screencast.com/t/x7B3BCZQDgQ
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_1"]‘); ?>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_2"]‘); ?>
here you shoudl add your code for custom Ad 1 and Custom Ad 2, like this -> http://screencast.com/t/y0ipBDeG3i

Thanks for the message!

Catalin
tagDiv Staff

Hello sami2569,

If you want to add a banner ad to the bottom of every post, you should use the Article Bottom Ad from Theme panel, like this -> http://screencast.com/t/DhN8lfvZ Also, if you want to add more than one Advertisement here, you should edit the post template core file used by you and there you should use the do_shortcode method. For example, if you are using the post template style 1 you should edit the loop-single-1.php, like this -> http://screencast.com/t/Wfrwhqhcivz and the result you should see here -> http://screencast.com/t/x7B3BCZQDgQ
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_2"]'); ?>

here you shoudl add your code for custom Ad 1 and Custom Ad 2, like this -> http://screencast.com/t/y0ipBDeG3i

Thanks for the message!

Catalin
tagDiv Staff

Hello F3rious,

Yes, if you want to do this, you should use the do_shortcode method and add it inside your post and if you want to have this ad inside to your all posts which are part of certain post template, you should edit the theme core file according to your post template used by you. The code is here -> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?> If you want to add directly the code inside the post, you should do this -> http://screencast.com/t/infK2eNQlf8k Also, if you are using the post template style 1 you should edit the loop-single-1.php like this -> http://screencast.com/t/b8FBqZmb and there you should ad the code where you want to appear on the page.

Thanks for the message!

Bogdan B.
tagDiv Staff

Hello,

The revolution slider as well as visual composer do not have any option to place a slider in the category template. It can only be done by editing the theme code. Our theme has no option to add content to category templates. If you want to add it through the theme code you can use a do_shortcode function https://developer.wordpress.org/reference/functions/do_shortcode/ in the category template files: http://screencast.com/t/mXbkHkz08nj

Thank you!

Bogdan B.
tagDiv Staff

Hello,

Well any image will impact the site’s page speed. The bigger it is, the slower the site will be. If you want it full width, we suggest not going over 1920 px as most monitors have a full had resolution (1920×1080) if you want the image full width of course. If you want to place the image above the menu you can use a do_shortcode function inside the theme php file corresponding to the header style you use. Then place the image shortcode inside the function like so:
<?php
if (is_front_page()){
echo do_shortcode('here you should add your shortcode');}
?>

http://screencast.com/t/TEbJuLdrP3F

Thank you!

Bogdan B.
tagDiv Staff

Hello,

Visual composer will not help you in that I;m afraid. It can only be done by editing the post template files and using a do_shortcode function.
Here is an example of a block 1 added after the comments on posts:
For this I add this code:
echo do_shortcode('[td_block_1]');
In the post template files like so: http://screencast.com/t/Oa0NYEEGb

Thank you!

Bogdan B.
tagDiv Staff

Hello,

If you want to add a block in a header style you should use the do_shortcode funstion like this example:
https://forum.tagdiv.com/topic/add-a-button-to-header-menu/
simply cahnge the shortcode to a block 15 shortcode.

Thanks.

Bogdan B.
tagDiv Staff

Hello,

On posts you cannot use visual composer as you would on pages. you will have to create a video lement in visual composer on a dummy page and then use a do_shortcode function in the theme files to show the element after the comment box. There is no setting in the theme that can allow you to add content there.
This will add a video across all posts that use the template that you alter.
Here is an example:
1 Create the video element on a dummy page and set the video id to it: http://screencast.com/t/l4X0HTyCJ
2 Copy the shortcode from the video in classic editing mode and text mode: http://screencast.com/t/JX7DVWA75q
3. Use this function and place the shortcode inside it:

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

4. Place it in one or more of the theme template files. There is a file for each post style:
http://screencast.com/t/MvIqS1GMS3Jb

Thank you!

Catalin
tagDiv Staff

Hello deelv,

Unfortunately, I do not have any access to your screenshot and also, I do not exactly understand what you mean. So, if you want to add some buttons to your header menu, please notice that our theme does not have any such an option that allows you to add some buttons there but the only way to do this would be to use the do_shortcode of Visual Composer and then, add the code in the specific core file, according to your header style used by you. For example, if you are using the Header Style 1 you should alter the code to the header-style-1.php like this -> http://screencast.com/t/O3ksoXxtn0 The shortcode can be created when you edit a page, like this -> http://screencast.com/t/dOskl5tBHj -> http://screencast.com/t/lnbhA7lldl9X and the right syntax for this method should be like this -> <?php echo do_shortcode('here you should add your shortcode'); ?>
For more information about this method, please consult here -> https://developer.wordpress.org/reference/functions/do_shortcode/

Hope this helps!

Thanks for the message!

Bogdan B.
tagDiv Staff

Hello,

1. If you want to add a custom ad at the top of the site, you can use a do_shortcode function and use it in the top menu file: http://screencast.com/t/szEdT7nC
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
This code will render the custom ad 1 spot in the theme panel

2. For a full logo you will have to use a header style that uses the full logo. These are styles 9, 10 and 11

3. For a language switcher you will need to use plugins as the theme has no such option.

Thank you!

fahad.sheikh
tagDiv Member

Hello,

That is really sad. There has to be an option to filter custom taxonomies because there is a high chance if someone is using custom post types they will use custom taxonomies.

What if as a workaround I try an alternative approach and get all the ids of the posts assigned to a category and give them as a parameter to postids using the do_shortcode wordpress function.

Will it effect performance?

Bogdan B.
tagDiv Staff

Hello,

Unfortunately the only option where you can place any element below the pagination is a static page you can edit in visual composer and you can paginate each block. The theme does not have any option to place elements below any standard pagination. If you want to add any element below a paginated post you will have to edit the theme files and add a do_shortcode function inside the post template files depending on the post style that you use: http://screencast.com/t/mtxWLAZyH

You can use the code like so:
<?php echo do_shortcode('[td_block_video_youtube playlist_yt="NRuE38Bl5Mo, 1ZgoluYjuZM, 0K-0vkFfUmY"][/vc_column]'); ?>

Thank you!

Catalin
tagDiv Staff

Hello,


@tonikusi4
, I have inspected your post pages, and I notice that you are using the single template style 1. Further, if you want to add some ads after to the related articles section you should edit the loop-single-1.php core file, based on the explanation above. If you want to have more than one Ad, you should use Custom Ad 2, 3, 4 with the do_shortcode method. After adding this, maybe you should use a bit of CSS to obtain a good design.

@jboursaw
, I have checked your website and everything seems to look good. Thumbs up.

Thanks for your understanding!

Bogdan B.
tagDiv Staff

Hi,

Please check your other topic on newsmag as i have provided a solution to place an ad inside the post template using a do_shortcode function.

Thank you!

Bogdan B.
tagDiv Staff

@ both
If you want to place a custom ad in the posts above the related articles section you will have to use the do_shortcode function and place it inside the post template files that corresponds to the post template that yopu use. Here is an example:
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
this code will render the ad from custom ad 1. You can see the shortcodes in visual composer on an ad box element (switch to classic mode in page edit to see the code and get the shrotcode)
Now to place it inside posts above the latest articles you need to add it like so:
http://screencast.com/t/8Rl1SWbTyB

Thank you!

kr15k0
Participant
#0

Hello guys,

How to add two ads below the article. I need something like this –> https://s18.postimg.org/wkytmax7d/test.png

Currently I am able to place just 1 add. I found a way to add a second ad using “do_shortcode” but I am not sure how to align them and make them one next to other.

My website: dnesnovinite.com

Bogdan B.
tagDiv Staff

Hello,

Unfortunately, the Related Articles feature has been designed to use only the posts from the same category which can be filtered by categories and tags. If you want to change the functionality from this block, you should alter the code from the theme core file where the code is created, like this -> http://screencast.com/t/xTxHRlUhgl If you have a solid knowledge of PHP and HTML you should implement it yourself, otherwise please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!
Another alternative for you would be to disable the Related Posts block and add in that section with do_shortcode method a simple block which you can filter it by latest articles from entire site and your problem will be solved. Also, you can give the similar name to your block, like Latest Articles. As a hint, you can see here an example to post template style 1, like this -> http://screencast.com/t/Ns3rVIIf

Thanks for your understanding!

Catalin
tagDiv Staff

Hello dan21,

Unfortunately, the Related Articles feature has been designed to use only the posts from the same category which can be filtered by categories and tags. If you want to change the functionality from this block, you should alter the code from the theme core file where the code is created, like this -> http://screencast.com/t/xTxHRlUhgl If you have a solid knowledge of PHP and HTML you should implement it yourself, otherwise please consider hiring a freelancer/developer to help you because we cannot provide custom work at the moment, sorry!
Another alternative for you would be to disable the Related Posts block and add in that section with do_shortcode method a simple block which you can filter it by latest articles from entire site and your problem will be solved. Also, you can give the similar name to your block, like Latest Articles. As a hint, you can see here an example to post template style 1, like this -> http://screencast.com/t/Ns3rVIIf

Thanks for your understanding!

Catalin
tagDiv Staff

Hello nano2408,

Please keep in mind that the bottom ad is already included in post content and it is not a simple task to change its position to another, sorry! Another alternative for you would be to use a Custom Ad 1, for example, and add it where you want. For example, if you are using the post template style 3, you should use the do_shortcode method with the Custom Ad 1 and change the code from the loop-single-3.php core file, like this -> http://screencast.com/t/VmMuT6GbdS The snippet of the code is the following one ->
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
If you want to create a new Custom Ads, you should consult the topic here -> https://forum.tagdiv.com/topic/create-additional-custom-ads/

Thanks for the message!

Bogdan B.
tagDiv Staff

Hello,

Unfortunately most of these will require custom implementation and we do not have a customization department. We try to help out where we can though.
For the ad, smartlists have their ad section in the theme panel where you can change the ad size: http://screencast.com/t/HmFIrv0X
Any other ad besides the intended one must be added through hard-coding in this file: http://screencast.com/t/xMvKMrenl
If you want to remove the bottom buttons you can remove them from here: http://screencast.com/t/scJPi3eN
The color style can be changed by adding this css code in the theme panel->custom css box:
.td-smart-list-button{
background-color: red;
}

The hover color is added by the theme accent color.
Again. if you want another ad, the theme ad spots cannot offer only 1 spot. You will have to add them in the theme code by using a do_shortcode function
https://developer.wordpress.org/reference/functions/do_shortcode/

Thank you!

Catalin
tagDiv Staff

Hello jboursaw,

I have inspected your website and I saw that you are using the Page Template+Latest Articles+Pagination as for your front page, right? So, if you want to add an Ad Block at the very top of your latest articles, above this, you should edit the page-pagebuilder-latest.php core file and then, use the do_shortcode method and add your desired Ad which has to be added to your Custom Ad 1 in the panel, like this -> http://screencast.com/t/9WYabRBwg -> http://screencast.com/t/0zIZ9ueFLut and the result you should see here -> http://screencast.com/t/6LcA9dyJJ
The snippet of the code which you should add there is ->
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>

Hope this helps!

Thanks for the message!

Bogdan B.
tagDiv Staff

Hello,

The news ticker as a any other block element in visual composer must be added on each page as it’s not a widget. It is a block element. If you want it on pages you have to add it in. There is a workaround if you truly want to place it, but you will need to edit the theme files for that. The theme has no such setting.
You can filter the news ticker the way you want to and then place the shortcode in a do_shortcode function like so :
do_shortcode('[td_block_trending_now]'); ?>
Your shortcode could look different based on your settings.
Then you can add the above function in the page template files. There are 3 page templates. Add the function in the one you use on your pages or all 3 if you use all of them
http://screencast.com/t/PJ93bR1eKe

Thank you!

Bogdan B.
tagDiv Staff

Hello,

That is the default implementation of the mobile theme. Unfortunately it cannot be overwritten so simple as it will not allow any shortcode to be placed on the page with a do_shortcode function. The mobile theme will not allow that so i cannot provide an easy method to add content above the grid.

Thanks.

Viewing 25 results - 351 through 375 (of 1,077 total)