Search Results for 'do_shortcode'

    No search results were found in Documentation!

Results from the Forum
Lucian
tagDiv Staff

Hi,

To show your ads in the category page after the category description you need to place you ad code here: http://screencast.com/t/LuW5gQXT1Q – and add using the do_shortcode() function.
Use this method to place ads between posts in the loop: https://forum.tagdiv.com/topic/how-to-add-ads-in-category-pages/#post-21940

Thanks

Alin [tagDiv]
tagDiv Staff

Hi,

I’m not sure if you want something like this – to have full menus(top an main) on default style.
If you want something like this you can replace header style 1 template with this code(make a backup of the file): http://pastebin.com/2iRriKP1
And add this css in Theme Panel > Custom Css: http://screencast.com/t/Mwvv6ow2nCihttp://screencast.com/t/5F5v3IXwUW

Also you can use do_shortcode() function use a custom ad bellow the menu – http://screencast.com/t/O5N6AaFXMhttp://screencast.com/t/aMlF2JhA

Thanks!

mrmorrison
tagDiv Member

Thanks Alin.. I changed the shortcode and now the full code input for the ad looks like this:

<div class=”td-container”>
<div class=”td-container-border”>
<div class=”td-pb-row”>
<?php echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_8"]‘);?>
</div>
</div>
</div>

but still displays like this: https://www.dropbox.com/s/zcmpbujswd6vbiq/shortcode%20ad.PNG?dl=0

page used for screenshot (third 2 row advert in center column): http://dev.diaryofahollywoodstreetking.com/kenya-moore-millionaire-matchmaker-sponsor/

login: client
pass: client

Alin [tagDiv]
tagDiv Staff

Hi,

You use a shortcode with full width row – http://screencast.com/t/npAuhitKEYjW
Please try to paste the code like this and see if it solve the issue:

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

Thanks!

mrmorrison
Participant
#0

Hello,

Any help would be greatly appreciated.

I am trying to insert a custom ad into the loop-single-1.php

i followed instructions here: https://forum.tagdiv.com/how-to-insert-ads-in-custom-areas-of-the-website/

custom ad 8 in the theme options is populated with this ad code:

<div id=”taboola-below-article-thumbnails”></div>
<script type=”text/javascript”>
window._taboola = window._taboola || [];
_taboola.push({
mode: ‘thumbnails-j’,
container: ‘taboola-below-article-thumbnails’,
placement: ‘Below Article Thumbnails’,
target_type: ‘mix’
});
</script>

I created a new page with just the ad block (in this case custom ad 8). Then i saved the page and grabbed the shortcode:

<?php echo do_shortcode(‘[vc_row][vc_column width="1/1"][td_block_ad_box spot_id="custom_ad_8" spot_title="Taboola Under"][/vc_column][/vc_row]‘);?>

I placed the code below related posts into the loop-single-1.php like this:

<footer>
<?php echo $td_mod_single->get_post_pagination();?>
<?php echo $td_mod_single->get_review();?>

<div class=”td-post-source-tags td-pb-padding-side”>
<?php echo $td_mod_single->get_source_and_via();?>
<?php echo $td_mod_single->get_the_tags();?>
</div>

<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>

</article> <!– /.post –>

<?php echo $td_mod_single->related_posts();?>

<?php echo do_shortcode(‘[vc_row][vc_column width="1/1"][td_block_ad_box spot_id="custom_ad_8" spot_title="Taboola Under"][/vc_column][/vc_row]‘);?>

<?php
} else {
//no posts
echo td_page_generator::no_posts();
}

however the final display is like this: https://www.dropbox.com/s/b5fke5p32qyz2n0/under%20related%20posts.PNG?dl=0

I need it nicely fit like it does when the same ad code is placed in the Article Bottom Ad < which i dont use because I need placed below related articles instead of above. exactly like here: https://www.dropbox.com/s/tifoolvtsyoayk4/article%20bottom%20ad.PNG?dl=0

Any assistance would be greatly appreciated.

Thank you

Alin [tagDiv]
tagDiv Staff

Hi,

Please paste your adsense code from bottom ad in a custom ad: http://screencast.com/t/TzuoKV9JE7fu
Use do_shortcode() function and add custom ad shortcode bellow author box in post template file(you can edit post template file that you use: loop-single.php is default post style): http://screencast.com/t/ZmiYLiRbLfI

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

Adjust with css code top and bottom space: http://screencast.com/t/MVowgGa2T

.single .td-g-rec-id-custom_ad_1 {
margin-top: 10px;
margin-bottom: 0px;
}

Paste custom css in Theme Panel > Custom Css: http://screencast.com/t/j19UM4TrBQc

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Please add your adsesnse code in custom ads and using do_shortcode() function display them before featured image in the post template that you use(I guess that you use post style 2 – edit loop-single-2.php): http://screencast.com/t/GWxrrtuXb2bG

echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
echo do_shortcode('[td_ad_box spot_id="custom_ad_2"]');

Result: http://screencast.com/t/CZwLFpoejR1
Please use this custom css in Theme Panel for ads, to make those appear side by side:

.single .td-g-rec-id-custom_ad_1 {
float: left;
}

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

How you can see the bottom ad is a part of the post content – http://screencast.com/t/jng4o2dJd so it no do easy to move it bellow reviews.
But you can paste your adsense code in a custom ad – http://screencast.com/t/P4RlrVp9CaU0 and use do_shortcode function to display it bellow reviews like this: http://screencast.com/t/swOSa31Pfd4
Result: http://screencast.com/t/OPL62EOz

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Please try this custom css in Theme Panel > Custom Css to remove spaces: http://screencast.com/t/ykRDYlNbQj9http://screencast.com/t/rsscO8XrU

.et_monarch .et_social_inline_top {
margin-bottom: 0px;
}
.et_monarch .et_social_inline_bottom {
margin-top: 0px;
}
.single .td-post-content .post {
padding-bottom: 0px;
}
.td-g-rec-id-content_bottom .adsbygoogle {
margin-bottom: 0px;
}
.td-social-like-tweet ul, .td-social-sharing {
margin: 0px;
}

To change the order of the like buttons please make this change: http://screencast.com/t/SnGvC0no
Result: http://screencast.com/t/j22YsTMa083s

Unfortunately the bottom ad is in the content and it cannot be moved so easily, but you can paste the code in a custom ad(don’t use bottom ad anymore), edit you post template that you need and echo your custom ad there after the like buttons: http://screencast.com/t/n4wZ6esrtEsq

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

Result: http://screencast.com/t/JceFCM9NT7

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Unfortunately you will have to make a change in menu-top.php add this code: http://screencast.com/t/BUexBkQgH0vY

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

Paste you ad code in Theme Panel > ADS > Custom Ad1 – http://screencast.com/t/C5gk9tLD2rwY if is not an adsense code please use this divs for banner image(just replace with you image): https://forum.tagdiv.com/ads/
Also you will need small css customization: http://screencast.com/t/PFKFnm5jHC

.td-a-rec-id-custom_ad_1 {
margin-bottom: 2px !important;
}

Please note that if you use google adsense you will need to use this class .td-g-rec-id-custom_ad_1 just replace a with g.

Hope this helps!

Lucian
tagDiv Staff

Hi,

If you’re not using a static page then you refer to latest posts page. In that case you need to alter the index.php file and add the big grid: http://screencast.com/t/uO5gxbeTOURb

You can use the page builder to built it then get it’s short-code and use the do_shortcode() function to render the shortcode on the template.

If you don’t know how to do this I suggest you get a freelancer to help you with it.

Thanks

Alin [tagDiv]
tagDiv Staff

Hi,

Unfortunately the theme doesn’t have an option for this, but you will need to make some custom changes in the loop.php file something like this: http://screencast.com/t/K85ZuA97nLib

$adcounter++;
if (is_tag()) {
if ($adcounter == 1 or $adcounter == 2) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
}
}

Result: http://screencast.com/t/FACtVvz2jy4h

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

Thanks!

Kalepo
tagDiv Member

@Lucian
Could you explain, where exactly place add add_filter( ‘category_description’, ‘do_shortcode’ ); in the file you describe?
I need the shortcodes to pimp my category description, but unfortunately I am not a PHP specialist…

Thank you in advance.

Alin [tagDiv]
tagDiv Staff

Hi,

You can try to add the plugin’s shortcode using do_shortcode function into the post template after the sharing buttons: http://screencast.com/t/IvQBPGprfngj

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

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Unfortunately like you can see in this screenshot the bottom ad is in the post content and the pagination cannot be added there: http://screencast.com/t/DghifgqIzm3t
What you can do is to add a custom ad using do_shortcode function and add it bellow post pagination: http://screencast.com/t/LPdLRt46uB

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

Result: http://screencast.com/t/3YZFqPLlRT

Thanks!

sfeaton
tagDiv Member

Ok thanks. However, the same problem. That code is not showing the ad it is only showing “< ?php echo do_shortcode (‘[td_block_ad_box spot_id="custom_ad_3"]‘); ?>” on the posts.

Lucian
tagDiv Staff

Hi,

Add the do_shortcode function to the category description variable like this: http://screencast.com/t/C9mIcDfS6

Thanks

Alin [tagDiv]
tagDiv Staff

Hi,

You need to use do_shortcode ('[td_block_ad_box spot_id="custom_ad_3"]'); ?> as that shortcode has been changed from 1.5 version of the theme: http://screencast.com/t/ySZz4HIarI

td_ad_box spot_idtd_block_ad_box spot_id

Thanks!

sfeaton
Participant
#0

I am trying to add a custom ad under the author box but it is not showing up. I have the following code:

<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo $td_mod_single->get_author_box();?>
<?php echo do_shortcode(‘[vc_row][vc_column width="1/1"][td_ad_box spot_id=”custom_ad_3″][/vc_column][/vc_row]‘);?>
<?php echo $td_mod_single->get_item_scope_meta();?>

But the text “[td_ad_box spot_id=”custom_ad_3″]” is showing up where the ad should be. Am I missing something?

Oxidesign
Participant
#0

Hello,

There is a solution to add shortcode to a category page on description ?

It’s not working, even when i add add_filter( ‘category_description’, ‘do_shortcode’ ); to functions.php.

Thank you,
Best regards,

Alin [tagDiv]
tagDiv Staff

Hi,

Please add the shortcode for your ad in single.php if you use default post template like this: http://screencast.com/t/BxOjwAlcosVl

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

And use this custom css in Theme Panel > Custom Css to add top border: http://screencast.com/t/gNuTaVrUZ

Hope this helps!

Alin [tagDiv]
tagDiv Staff

Hi,

You can paste the code in Theme Panel > Ads > Custom AD use do_shortcode function in template that you need: http://screencast.com/t/WuwFNzzqd

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

Result: http://screencast.com/t/HXd4fS7X6Rhi

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Where did you added the shortcode? Please provide more details about this.
If you want to add the shortcode in the template please use do_shortcode() function:

<?php echo do_shortcode ( 'yourshortcode');?>

Thanks!

Alin [tagDiv]
tagDiv Staff

Hi,

Please add this code in loop.php file to have ads on homepage article list: http://screencast.com/t/rG7rDLmRrTD

$adcounter++;
if (is_home()) {
if ($adcounter == 5 or $adcounter == 10) {
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
}
}

Please also paste the ad code in custom ad 1 or change the number of custom ad in the code(the custom ad that you want to show): http://screencast.com/t/n6omBeV0r

Hope this helps!

Rony123456
Participant
#0

Hello all,

I want to add this shortcode [td_ad_box spot_id=”custom_ad_1″] to my articles. I am trying to use the eco do_shortocode like this:

echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_1″].

Now, where do I put this code in order to load it just below the previous/next article buttons at the end of articles?

Do I need to use this:

<?php
echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_1″]
?>

And which file do I need to edit and at what part to add it?

Viewing 25 results - 901 through 925 (of 1,077 total)