Search Results for 'do_shortcode'

    No search results were found in Documentation!

Results from the Forum
Andrei L.
tagDiv Member

Hi

By default the theme does not have options which allows you to customize the category page using Visual Composer. This may be possible only by editing the code. Here is an example:
– let’s say that I want to display this mini-page created with VC on Fashion category page: http://screencast.com/t/wdSAoI0Q12
– I can use do_shortcode function on category.php file like here: http://screencast.com/t/dNKMq5UyThttp://screencast.com/t/xSpErHrpUhhttp://screencast.com/t/saBfozlYxKthhttp://pastebin.com/YRQExPZi
– the result will be like here: http://screencast.com/t/X4x7L6QHyh

This is just a basic example but you can use it to insert content from Visual Composer on category pages.
Thanks!

tilakmarg
tagDiv Member

Please note that I have used Super Socializer plugin, so I have used its shortcode. To do so, in the file Newsmag/parts/header/top-menu.php, I have inserted following line at Line No. 81:

<div>'; echo do_shortcode('[TheChamp-Login title="Login with Facebook or Twitter"]') ; echo '</div>

Hope it helps.

Bogdan B.
tagDiv Staff

Hi,

In order to add a custom ad position, you can use one of the theme’s custom ad spots like custom ad 1 for example and use a do_shortcode function: <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
You can add this shortcode inside the theme files in the desired spot you chose, I;m not sure what titles you are referring to, but on posts for example you can add it under the title code here: http://screencast.com/t/xFk82tqrJtCS
You need to do this for every post template as each post style you chose from post settings has it’s own file.

Thank you!

Bogdan B.
tagDiv Staff

Hi,
My screenshot suggested adding a shortcode inside a page template file. What that means is addin a do_shortcode function like so:
<?php echo do_shortcode('YOUR SHORTCODE HERE');?>
This line of code goes inside one of the post template files. Every post style you chose in post settings has it’s own file I pointed in the above screenshot. you can add this line of code inside different parts of the file for different positioning results. If this is too complicated, then you need to hire a freelancer to help out as this represents customization and above that, rss plugins are not tested with our theme so I cannot provide a solution as it will be just ‘guess work’.
Thank you for your understanding!

The Transnational Post
tagDiv Member

Hi Bogdan,
As started earlier, I’m using WP RSS AGGREGATOR for my news feed, It looks like I have to place a short code to the them ( [wp-rss-aggregator] ) I need help on where to place the short code

Hi,
As their official documentation states, you can either add it directly in the post content or in the theme template files here: http://screencast.com/t/xkE3LCYb
Every post style has it’s own file. You can use the do_shortcode function as theiur docs state at the bottom of the page
Thank you!

HI Bodgan,

I need help with adding the shortcode, I now I added a shortcode for the video player, any tutorial on adding the shortcode, just can’t work around the screentshot sample you sent me.

Regards,
Stanley

Bogdan B.
tagDiv Staff

Hi,
The head tag for the mobile theme is located here: http://screencast.com/t/KEF39yWVyowi
You can try to add your code inside the element. Keep in mind that the mobile theme does not use shortcodes so a do_shortcode function will not work with it as visual composer elements will not get rendered.
Thank you!

Catalin
tagDiv Staff

Hello arvindk,

Please notice that the Ads will be displayed for your smart list only if you will use the Smart list 6,7,8 -> http://screencast.com/t/CTFhbjN8Z and the ads for these you can set from the Theme panel, like this -> http://screencast.com/t/cg1K7wGv7pA
Unfortunately, we do not have a list with theme shortcode. So, if you want to use the do_shortcode() method, all of your desired shortcode you will have to take from your Visual Composer, like this -> http://screencast.com/t/Xqf5mOWElRH and the shortcode for this element you can get it in this way, like this -> http://screencast.com/t/YmiFx4k6Pyr This type of method are used then you want to add your ads (in this example) in a certain place of your site. For example, the snippet of the code for this Ad box will be the following ->>
<?php echo do_shortcode('[td_block_ad_box]');?> and then this it would have to be added in the core files corresponding to your desired place from your website. (for example, if you add the ad in your posts, you have to edit the loop-single corresponding to single template used by you and so on).

If you need more assistance in this regard or you have another problem, please submit a new topic on the forum.

Thank you for your understanding!

arvindk
tagDiv Member

I am using Newspaper 7.0.1. I have found a problem with Adsense ads not displaying when I chose smartList layout for a post. Is this a known bug or is this something which can be fixed by tweaking some settings??

Another thing. Ok – I though it was worth trying to put Article Ads as shortcode in top and bottom of my post which had smartlist layout, as it didnt display ads in case of smartlists. Voilla I could not find a single reference to shortcodes in this so called documentation which eventually lead to this Forum!! All I could find is a word [shortcode] in https://forum.tagdiv.com/article-ads/, which says:
[shortcodes] – the spot will run do_shortcode() on the ad. Using shortcodes you can add adRotate ads to that spot. – What does this mean? Can you explain.

Where do I find a list of SHORTCODES this theme provides? Is it not worth considering to put a page somewhere which list all the shortcodes this theme provides?

I am a web developer with almost 10 years of experience in coding, still I am finding it hard to find solutions and helpful things in this theme’s documentations.

  • This reply was modified 10 years by arvindk. Reason: changed 7.1 to 7.0.1
QZER
tagDiv Member

I don’t know where to add the code. echo do_shortcode(‘plugin-shortcode-for-register-form’);

Form 2
I would like to add these forms instead of the your forms.

Form 1

my plugins shortcodes
shortcodes

  • This reply was modified 10 years by QZER.
  • This reply was modified 10 years by QZER.
Bogdan B.
tagDiv Staff

Hi,
If you want to have custom ad spots, you need to edit the theme files and add it by hard-coding it. Every post style has it;s own file corresponding to it here: http://screencast.com/t/BRgkaMziUw9y
For example: <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
This is a shortcode for the custom ad 1 spot from the theme panel.
Thanks.

Bintmusic
tagDiv Member

Hi Catalin

I find that the mobile theme is great for performance
impossible not to use it, you have done a great job

I saw that remove “featured” on front-page.php at the line

<div class=”td-container”>
<?php echo do_shortcode(‘[td_block_big_grid_mob_1 sort=”featured“]’); ?>
<?php the_content(); ?>

They are able to get into the mobile home a grid with the last three articles…
The problem is that they also are shown below in the “latest articles.”

You should just find a way not to show the first three items below in “last articles”

Thanks!

Bogdan B.
tagDiv Staff

Hi,
As their official documentation states, you can either add it directly in the post content or in the theme template files here: http://screencast.com/t/xkE3LCYb
Every post style has it’s own file. You can use the do_shortcode function as theiur docs state at the bottom of the page
Thank you!

Catalin
tagDiv Staff

Hello socialleo,

Unfortunately, our theme does not have such an option that offers you a way to add your ads in this places of a site, but it can be done only through code. First of all, you have to create your shortcode and then you have to place the code in core file according to smart list used by you. For example, if you are using the smart list 8, you have to add the do_shortcode method in td_smart_list_8.php, like this -> http://screencast.com/t/UFhhrRh18VFL and the code for your custom ad 1 is -> $buffy .= do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');
The result you should see here -> http://screencast.com/t/yroXAs923

Also, please ensure that your custom ad fields contain your desired code, like this -> http://screencast.com/t/wOAwvRwTwP

Hope this helps!

Thank you for your understanding!

filantrop2013
tagDiv Member

Am copiat cele doua coduri in td_ad_box.php. Dupa asta iar m-am blocat 🙂

Cu tema 4, folosesc la Header style: Style 1 – (logo + ad) + menu. Pentru asta unde trebuie sa copiez codul:

< ?php echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_4″]’); ?>

ca sa apara sub meniu?

(Imi cer scuze pentru neintelegere, dar chiar nu ma pricep la coduri)

Bogdan B.
tagDiv Staff

Buna,
Am facut mai multe teste cu aceasta versiune si solutia pe care am oferit-o referitor la custom ad 4 are nevoie de ceva in plus. Pe langa modificarea facute deja si exemplificata in topicul celalalt, trebuie adaugate aceste linii de cod: http://screencast.com/t/ai2k0yasN si http://screencast.com/t/Qs8brocIzM4
Doar acum o sa fie custom ad 4 activ din toate punctele de vedere.
Dupa aceea trebuie folosit acest shortcode (nu cel de mai sus):
do_shortcode('[td_ad_box spot_id="custom_ad_4"]'); ?>
Acum depinde de header style-ul pe care il folosesti pentru ca acolo trebuie pozitionat shortcode-ul.
Stilul de header 3 sau 6 au acelasi tip de header ad sub meniu ca si cele pe cale le-ai exemplificat de pe newspaper 6 si nu va mai fi nevoie de modificari in cod pentru ele.
Daca tot doresti sa customizezi un alt header atunci trebuie adaugat codul in unul din aceste fisiere:
http://screencast.com/t/1VxGQzZIKnm5
Multumesc

Andrei L.
tagDiv Member

Hi

I am not sure how do you want to customize register form but you can try to edit top-menu.php and modify the login/register widget: http://screencast.com/t/Dz2EZCPP
If you want to display a register form generated by the ultimate member plugin just replace our code whith plugin’s shortcode like this:

echo do_shortcode('plugin-shortcode-for-register-form');

Thanks!

Andrei L.
tagDiv Member

Buna

Asigurate ca ai pus codul intre tag-urile de php ca in acest exemplu, altfel va fi renderizat ca si text:

<?php echo do_shortcode(‘[panel_ads spot_id=”custom_ad_4″]’); ?>

Pozitia ad-ului in pagina o poti controla folosind custom css dar va trebuii sa te asiguri ca noul ad-spot are o clasa unica in structura html, spre examplu td-a-rec-id-custom_ad_4

Mukltumes!

  • This reply was modified 10 years by Andrei L..
ilnegozio
Participant
#0

Hi there,

First of all, please accept my apologies all of these.

Please allow me to ask a few things about customization of the new Newspaper version 7.0.

1. Since I am doing some customization on my site and based on what I had read on the documentation and on your rules that any update of the Theme we should try again to re-implement the code for our customization, so I decided instead of doing that again and again is to add the Child Theme, that any update of the Theme still the customization of site will be there right? Please advise if this the best option? Hope it will.

2. (If Serial 1 is not the best option, leave this.) Please advise if this is correct to Add a Child Theme via FTP I will just add the Folder “Newspaper-child” located in /code folder? base on this Tutorial Link to add it under “wp-content/themes” right? by just dragging it via FTP? same on this Image Link.

3. Author Box Card replace it with USERPRO shortcode.
Filename:
/wp-content/themes/Newspaper/loop-single-12.php – this is my style number

ShortCode to add:
<?php echo do_shortcode('[userpro template=card user=author]');?>

Original String Structure:

<?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>

Modified String Structure: Please advise if this is correct syntax code?

<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>
<?php echo do_shortcode('[userpro template=card user=author]');?>
<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>

3.a. If I am using a Child Theme I just copy the Filename then create a directory structure path in the child theme as in the theme and paste the Filename based on this Tutorial Link aight?

4. Sign In/Join Desktop view popup version using USERPRO shortcode
Filename: wp-content/themes/Newspaper/parts/header/top-menu.php

ShortCode to add:

<div class="td-login-wrap">
' . do_shortcode('[userpro template=login]') . '

Original String Structure:

//<span class="td-sp-ico-logout"></span>
echo '<ul class="top-header-menu td_ul_logout">
<li class="menu-item">' .
get_avatar($current_user->ID, 20) . 'ID) . '" class="td_user_logd_in">' . $current_user->display_name . '' .
'
<li class="menu-item">
<i class="td-icon-logout"></i>' . __td('Logout', TD_THEME_NAME) . '

';
} else {

echo '<ul class="top-header-menu td_ul_login"><li class="menu-item">' . __td('Sign in / Join', TD_THEME_NAME) . '<span class="td-sp-ico-login td_sp_login_ico_style"></span>';
}
}//end login window

Modified String Structure:

Please advise how to add the correct syntax code.

4.a. Same on Serial 3.a. question.

5. Sign In/Join Mobile View using USERPRO shortcode
Filename:
Please advise where to modify it?

ShortCode to add:
Please advise the correct syntax code for this.

' . do_shortcode('[userpro template=login]') . '

Original String Structure:

Please advise where to modify it?

Modified String Structure:

Please advise how to add the correct syntax code.

5.a. Same on Serial 3.a. question.

6. FB Comments instead of WP comments
Filename:
wp-content/themes/Newspaper/header.php
wp-content/themes/Newspaper/loop-single-12.php

ShortCode to add:
header.php

<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=XXXXXX”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>

loop-single-12.php

<div class="fb-comments" data-href="<?php echo get_permalink($td_mod_single->post->ID); ?>" data-width="100%" data-numposts="5"></div>

Original String Structure:
header.php


</head>

<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">

<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>

<?php locate_template('parts/menu-mobile.php', true);?>
<?php locate_template('parts/search.php', true);?>

loop-single-12.php

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

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

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

Modified String Structure: Please advise if this is the correct syntax code?
header.php


</head>

<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">

<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=XXXXXX”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>

<?php /* scroll to top */?>
<div class="td-scroll-up"><i class="td-icon-menu-up"></i></div>

<?php locate_template('parts/menu-mobile.php', true);?>
<?php locate_template('parts/search.php', true);?>

loop-single-12.php

<?php echo $td_mod_single->get_item_scope_meta();?>
</footer>
<div class="fb-comments" data-href="<?php echo get_permalink($td_mod_single->post->ID); ?>" data-width="100%" data-numposts="5"></div>
<?php echo $td_mod_single->related_posts();?>

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

6.a. Same on Serial 3.a. question.

7. If there is a new update of the Theme like for example: header.php as we added a Custom Code on version 6.x.x has 92 Lines + 2 Lines on our Custom Code both on Main Theme and Child Theme then a new update came version 7.0 header.php has 98 Lines, since our Child Theme had originally 92 Lines, are we going to update also our Child Theme structure based on the latest one from 92 Lines to 98 Lines then + 2 Lines on our Custom code?

8. Mobile Theme Plugin – if I install this plugin would the Child Theme modification will reflect to this? I mean I made changes in Serial 3, 5 and 6 will it reflect also? Please advise.

8.a. Whats the difference between Theme Panel background color for mobile vs Mobile Theme Plugin Settings background color? Which one should I make the changes if this Plugin is installed?

8.b. Gradient color – may I ask the exact hex number of this color? Link Here

9. Am I allowed to create directory structure and add the following filename on the Child Theme incase all of the above are possible to my site.

>loop-single-12.php
>top-menu.php
>For Serial 5 filename
>header.php

I have sent my Login Credentials via mail incase you may need it with the same Subject here.

Regards

filantrop2013
Participant
#0

Salut,

Folosesc versiunea 4.2 temei Newspaper, si am nevoie de ajutorul vostru.

Intr-un forum anterior colegul m-a ajutat sa creez un costum aad 4, acuma am nevoie de ajutorul vostru ca sa setez locul bannerului care vreau sa fie intre meniu si content. Am pus codul

echo do_shortcode(‘[panel_ads spot_id=”custom_ad_4″]’);

in header, dar in loc sa imi arate ce am pus in costum ad 4, imi arata codul acesta. Am facut si un print screen cum arata acuma:

http://kepfeltoltes.hu/160511/banner-costumad4_www.kepfeltoltes.hu_.jpg

Asi vrea sa fie in mijloc si sa apara bannerul care am pus in costume_ad_4

Multumesc pentru ajutor.

ilnegozio
tagDiv Member

Hi Catalin,

I manage now to update my site to 7.0 without having a problem and I am proud to share it to the community.

Please help me to implement back the following:
1. Please advise if this is correct for Facebook comments and USERPRO Author Box – I manage to set this properly on the previous version 6.7.2 I am using loop-single-12.php style
<?php echo $td_mod_single->get_social_sharing_bottom();?>
<?php echo $td_mod_single->get_next_prev_posts();?>

- - - This is what I inserted a shortcode to show a USERPRO Author Box Card - - -
<?php echo do_shortcode('[userpro template=card user=author]');?>

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

- - - This is what I inserted a code to show Facebook Comment - - -
<div class="fb-comments" data-href="<?php echo get_permalink($td_mod_single->post->ID); ?>" data-width="100%" data-numposts="5"></div>

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

For Facebook comment – I place a code in header.php
<body <?php body_class() ?> itemscope="itemscope" itemtype="<?php echo td_global::$http_or_https?>://schema.org/WebPage">

<div id=”fb-root”></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = “//connect.facebook.net/en_US/sdk.js#xfbml=1&version=v2.5&appId=XXXXXX”;
fjs.parentNode.insertBefore(js, fjs);
}(document, ‘script’, ‘facebook-jssdk’));</script>

<?php /* scroll to top */?>

2. http://prnt.sc/b2jo8d – I want to know the exact gradient color of that in the screenshot.

Regards

jciview
tagDiv Member

I found a way by just eliminated the top posts from each category and adding the shortcode to the proper template in my child theme:

<?php echo do_shortcode('[vc_row][vc_column][td_block_big_grid_3 category_id="' . $thisid . '"][/vc_column][/vc_row]'); ?>

Andrei L.
tagDiv Member

Hi

Theme’s blocks weren’t designed to be displayed on post content so there could appear some layout issues using them there. In most cases a block will be displayed fine within post content but in some cases could appear some layout issues.
To display a block in post content follow this steps:
– create a blank page, add the desired block on it and set it as you want to be displayed: http://screencast.com/t/fj2q2GkBE77q
– copy the shortcode and paste it in post content where you want to display that block: http://screencast.com/t/4fbP8dXOghttp://screencast.com/t/p9dUBEY4http://screencast.com/t/46yRqnUaMjk

To replace related article with a custom block you have to edit the file corresponding with post template used and use do_shortcode like here: http://screencast.com/t/EjxTtrx2wisC

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

With regard at support please refer at this link for more details in this regard: http://themeforest.net/page/item_support_policy We can only support offer for current features of the theme, not to extent theirs functionality. Our theme is very flexible and can be customized in many different ways. However that require s bit of coding and some tests to achieve the desired result.

Thanks!

  • This reply was modified 10 years by Andrei L..
adnan
tagDiv Member

Bintmusic in: Newspaper > mobile > front-page.php line:50

<?php echo do_shortcode(‘[td_block_big_grid_mob_1 sort=”Your-category”]’); ?>

Bogdan B.
tagDiv Staff

Hi,

1) In order to add the code besides the author name in the bottom author box, then you need to add it to this file: http://screencast.com/t/ccOh7k2G

2) In order to implement facebook comments, you have to disable the theme comments and then place the facebook comments shortcode in the template files here: http://screencast.com/t/oTnWURqrAb3
do_shortcode('your shortcode here'); ?>
You have to do this for every post style you use on your site. every post style has it;s own file.

3) You can use this css to activate the top menu on the mobile version.

@media (max-width: 767px){
.top-bar-style-1 .td-header-sp-top-menu {
display: block!important;
}
.td-header-top-menu-full {
display: block!important;}
.td-header-sp-top-widget{
display:none!important;
}}

Thank you!

Andrei L.
tagDiv Member

Hi

You can change category id depending by post’s category using this cod: http://screencast.com/t/lEWHIm5y4x

    <?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="2"]                       [/vc_column][/vc_row]');
    ?>

This code insert post’s category id inside shortcode and should work fine.
Thanks!

  • This reply was modified 10 years by Andrei L..
Viewing 25 results - 526 through 550 (of 1,077 total)