Search Results for 'do_shortcode'

    No search results were found in Documentation!

Results from the Forum
mm-2
Participant
#0

Hello,

I’m trying to add the following code to my homepage but with no luck:

<?php echo do_shortcode(' | vrijeme čitanja: < [est_time]');?>

So, the idea is to add the estimated reading time to the homepage posts loop right after the post title and date published. I’m using Page Builder – with title template & Block 6 in Visual Composer. Any idea how to get this done?

Regards,

srikanth
tagDiv Member

Can u help me out at this instance also …After started using the custom ads code …
“<?php echo do_shortcode(‘[td_ad_box spot_id=”custom_ad_1″]’); ?>”

https://www.diigo.com/item/image/3bjz5/ikwu

Lucian
tagDiv Staff

Hi,

Use this line: <?php echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); ?> and add it where you want the add to display in the template.
Also follow this guide: https://forum.tagdiv.com/ads/
Hope this helps!

Thanks

Lucian
tagDiv Staff

Hi,

You will need custom work for this but you can also use a plugin for it and add it to the menu using shortcodes, you could replace the actual search with your own here: http://screencast.com/t/78SAKU4J3
You can do the same for the social icons and use a plugin.
you could also use the WordPress search widget and tagdiv social icons, use page builder to customize them and add it with the do_shortcode() function, should look something like this: http://screencast.com/t/vb0u2EBFRHg
This is the code I use for the example: http://pastebin.com/JTjXCD68
This is a start, if you don’t have basic php/html/css knowledge we recommend you to get a freelancer from sites like: http://studio.envato.com/ to do it for as we cannot offer custom work as we work hard on the development, updates, fixes and support.
Hope this helps!

Thanks

  • This reply was modified 11 years by Lucian.
Lucian
tagDiv Staff

Salut,

Ne pare rau pentru problemele si dificultatile pe care le intampini.
In ceea ce priveste light-box-ul il poti seta asa: https://forum.tagdiv.com/display-image-using-modal-window/ Din pacate o sa fie nevoie sa activezi modala pentru ficare imagine in parte deoarece nu am introdus inca o optiune pentru a o putea seta in mod implicit pentru toate imaginile. Daca doresti o poti dezactiva asa: https://forum.tagdiv.com/topic/dont-want-light-box-for-images/#post-17108
Asigura-te ca folosesti revolutin slider-ul corect si dezactiveaza plugin-ul speed booster-ul acesta poate fii cauza pentru care slider-ul nu este afisat.
Ai aici un ghid care te poate ajuta sa creezi un slider folosid rev slider.
Din pacate in momentul de fata nu poti controla meniul de pe mobile decat folosid css, poti urmarii topic-urile de mai jos sa incerci aceeasi metoda pentru a personaliza meniul pentru mobil:
* https://forum.tagdiv.com/topic/changing-the-mobile-menu/
* https://forum.tagdiv.com/topic/different-mobile-menu-when-using-megamenu-on-desktop/
Avem aceasta chestiune in vedere si vom incerca sa o imbunatatim in viitoarele update-uri ale temei.
Poti crea cate un sidebar pentru fiecare post daca doresti si sa folosestri sectiunea “Post Settings” pnetru a selecta sidebar-ul pe care vrei sa il folosesti, iar widget-urile din sidebar pot fii adugate si folosid shortcoduri deci poti folosi toate elementele din Visual Composer, doar adauga in fisierul functions.php filtrul add_filter('widget_text', 'do_shortcode'); si pe urma poti folosii shortcoduri in widgetul text.
Popup-ul “more article box” poate fi personalizat din theme panel > post settings: http://screencast.com/t/heoKx1jHg
Te rog anunta-ma daca mai ai alte nelamuriri legate de tema.
Sper sa te ajute!

Mersi!

Lucian
tagDiv Staff

Hi,

You can also add background for blocks if you use them without a row, you don’t need to place the block into a row to set a background for it, and you can use custom css to add a background.
If you still want to use the blocks in rows you can try it this way:
* add each block inside a row.
* In case of the sidebar you can build it from dashboard > appearance > widgets and for the elements you can’t add from there to the sidebar you can use a text widget and add them via short-codes. To get the short-code as you like use page builder to build the widget(tabs/blocks/…) then add the shot-code inside an text widget and into your sidebar.
* to make the short-codes work into the text widget just add this filter into functions.php file: add_filter('widget_text', 'do_shortcode');
* after you did this just use the Page Template Settings to use a sidebar and use the one you created.

Thanks

Lucian
tagDiv Staff

Hi,

A solution for this would be not to use article bottom ad from theme panel and instead add this line:

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

..like this in your post template file, if you want this in all post template files you will have to edit and add this line in all loop-single files, like this: http://screencast.com/t/PZrp0waEO
Now add the ad code you used to use in the article bottom ad in the custom ad 1 box in theme panel.
Result: http://screencast.com/t/iYsaDpQe6IK

Thanks

Lucian
tagDiv Staff

Hi,

You would have to edit the header.php and footer.php files and this line:
echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); like this in the header.php file: http://screencast.com/t/ex4p1w901Vd

…and this line: <?php echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); ?> like this in the footer.php file: http://screencast.com/t/Cjnh63IqAo (move it above the </body> if you need it inside the body)

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

Thanks

Lucian
tagDiv Staff

Hi,

You can use the do_shortcode() function and add the ‘code A’ on the category template and use a condition like this to show it only if it’s a specify category using this method: https://forum.tagdiv.com/topic/block-widget-to-appear-in-one-category/#post-21306
You can do the same for the ‘code B’ which you want on other categories.
And use the method I suggested above using Advanced Custom Fields plugin to display ‘code B’ and/or ‘code A’ on posts template.
If you can’t manage to do this alone we recommend you to hire a freelancer to do it for you.

Thanks

Lucian
tagDiv Staff

Hi,

You can make this change in loop.php file and add this code: http://screencast.com/t/3e4ogIsjrP

$adcounter = 0; add this at the top of the loop like in the screenshot.

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

.. and this at the bottom like shown in the screenshot.

Should work like this: http://screencast.com/t/RerPylFiEqI
Make sure you set the ad to show up on category pages after and exact number of posts if you are using an layout which is displaying two posts or 3 posts depending of page layout.

Thanks

Emil G
tagDiv Staff

Hi,

Try to edit the woocommerce.php file and add the following code – http://screencast.com/t/VtSdwn9Q

echo td_page_generator::wrap_start();
   echo do_shortcode('[rev_slider testing]');
echo td_page_generator::wrap_end();

Replace the [rev_slider testing] shortcode with your own – http://screencast.com/t/6E3g8OLd

Thank you, Emil G.

Lucian
tagDiv Staff

Hi,

Please add the value inside the panel_ads.php file – http://screencast.com/t/om4CzClEd like Emil suggested then use the do_shortcode() function to place the ad you use inside an ad box in theme panel > ads, like this: http://screencast.com/t/yk9RG2diwKyj
Here si the code you have to add:

echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]');
            echo td_page_generator::wrap_end();
            echo td_page_generator::wrap_start();

Result: http://screencast.com/t/UdpqvFyrOl
Note that my example it’s for the default post template without sidebar, you will have to modify and add the code into which template you want to have this.

Thanks

Lucian
tagDiv Staff

Hi,

You can use this code in loop.php file like this: http://screencast.com/t/lI3oL0TV0O6
Replace the ‘207’ with your category ID in which you would want the block to be showed. Also use the do_shortcode() function to add the block widget as you like, just replace the short-code from my example with your own.
Hope this helps!
Here is the code I used:

if  (is_category('226')) {
        echo do_shortcode('[vc_row][vc_column width="1/1"][td_block9 sort="random_posts" limit="5"][/vc_column][/vc_row]');
    }

Thanks

Lucian
tagDiv Staff

Hi,

You can add a text with title element using VC page builder: http://screencast.com/t/BdrvjYWFpC and customize it like you want, then switch to classic mode view, get the shortcode for it: http://screencast.com/t/C5xyIM5o260 and add it on comments template using the do_shortcode() function, like this: http://screencast.com/t/42KzpfRp
Result: http://screencast.com/t/wIsrHucJ

Thanks

Lucian
tagDiv Staff

Hi,

You can check and get the shortcodes you need from here: http://codex.bbpress.org/shortcodes/
We also used the bbpress shortcodes in the bbpress template: http://screencast.com/t/2vzJjkcs
Get the shortcode you want then add it anywhere on template using the do_shortcode() function.
Hope this helps!

Thanks

Lucian
tagDiv Staff

Hi,

You can use the same method I have suggested above. Here are the steps:

1. Use the page builder to create and customize block 5(which is made using module 4) to show the latest articles from all categories: http://screencast.com/t/UmiKiMHW
2. after you added and edited the block switch to classic mode: http://screencast.com/t/oNsv2jvf5po and get the shortcode for the block: http://screencast.com/t/J88Sz3HwG
3. You can add the block using the do_shortcode() function to echo the block into the posts template you want to display it, like I pointed above: http://screencast.com/t/TxqQdtaD7
Will show up like this on post page: http://screencast.com/t/BDU8KNvdk

Thanks

Lucian
tagDiv Staff

Hi,

You can check if the widget can be added using shortcode then use the do_shortcode() function to echo it into the posts template you want to display it.
Should look something like this: http://screencast.com/t/XE7lJ2FW

Thanks

Lucian
tagDiv Staff

Hi,

You can edit each template you want and add the shortcode using the do_shortcode() function. Should look something like this: http://screencast.com/t/esLXMffm8hQ
Do this for each template you want: http://screencast.com/t/HtwL21Cs

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

Hope this helps!
Thanks

Lucian
tagDiv Staff

Hi,

Use the do_shortcode() function and add the shortcode of your custom block as you like into post template after the comments template, other than that you could modify the post template and add the code for the loop there and customize it, the theme was not designed that way so this needs custom work and you need to hire a developer to do that for you if you don’t know how because we cannot offer custom work.

Thanks

Lucian
tagDiv Staff

Hi,

The best way to do this is to use VC to add your post content and then add a block into your post content which is set to infinite load: http://screencast.com/t/RAFpBqRJqF
Enable VC on post editing panel from here: http://screencast.com/t/fCBxUJiLksw
Another way would be to use the do_shortcode() function and add the code inside post template. You can create the shortcode for the block using page builder then switching to classic mode just get the shortcode and add it into the function then into the template where you want to show up. If you don’t know how to do this we recommend you to hire freelancer to do it for you.
Hope this helps!

Thanks

Lucian
tagDiv Staff

Hi,

You could do it the same way just instead of the function you could try to place the script or the code you want to show there inside a div tag and give it a class then use that class to style it via css.
Another way would be to place your code inside one of the custom ad boxes: http://screencast.com/t/vbmiKoAV8n then use the do_shortcode() function to place the code whre you want it to show using this code:

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

Just add your code inside the custom ad box 1 then place the code above where you want the block of links to show.
If it dose not work please try the other solution. If you don’t have basic css and html skills we recommend you to hire a freelancer from sites like http://studio.envato.com/ to do it for you, or you can try to search the web for a solution as this is custom work and we cannot offer custom work as we work hard on the development, updates, fixes and support.
Hope this helps!

Thanks

Lucian
tagDiv Staff

Hi,

Sorry about this! I saw the picture and thought you don’t want the logo, haven’t looked well at it, just remove the custom css I gave you from theme panel > custom css, it will show up.
You can use page builder to make your list of link and then get the shortcode and ad it using the do_shortcode function on the header or after the ad where ever you want the link to show on your page.

Hope this helps!
Thanks

Lucian
tagDiv Staff

Hi,

This theme also supports custom shortcodes, you can add the shortcodes on category page using the do_shortcode() function, like this: http://screencast.com/t/0dkXGyKB
Result: http://screencast.com/t/mq3fjjZvd

Thanks

  • This reply was modified 11 years by Lucian.
Lucian
tagDiv Staff

Hi,

Thanks Christopher!

@tekease

Please make sure you add the short-codes like this into posts or pages:
e.g.
[quote_center] quote text [/quote_center]

Or using the do_shortcode() function directly into the code, you should use an expression like this:

<?php echo do_shortcode( '[quote_center] quote text [/quote_center]' ) ?>
Hope this helps!

Thanks

Lucian
tagDiv Staff

Salut,

Pentru acel buton adauga:

<div style="display: inline-block"><?php echo do_shortcode( '[vc_button title="New topic" target="_self" color="default2" size="default2" href="#new-post"]' ) ?></div>
<div style="display: inline-block"><?php echo do_shortcode( '[vc_button title="Post reply" target="_self" color="default2" size="default2" href="#new-post"]' ) ?></div>

.. in fisierul content-single-topic.php asa: http://screencast.com/t/uNXeWgZJ
O sa obtii acest rezultat: http://screencast.com/t/fWP0N78gIbP
O sa ai doua butoane pastreaza unul sau cum doresti.
Adauga acelasi cod in fisierul form-search.php asa: http://screencast.com/t/QOwMJI9RoDl pentru acest rezultat: http://screencast.com/t/3NQ31iLoS

Poti sa editezi fisierele cu un text editor precum notepad++

1. Asta se intampla pentru ca banner-ul face parte din continutul postului iar pentru acel layout continutul este setat sa se modeleze dupa imagine, de accea bannerul cade sub iamgine cand redimensionezi fereastra, oricum acel banner o sa se incarce la dimensiunea screen-ului pentru device-ul de pe care este accesat site-ul tau, pentru desktop este ok pentru ca incape langa imagine iar pentru tablete si mobile o sa se incarce la alte dimensiuni, deci nu ai o problema, doar reincarca pagina de fiecare data can redimensionezi fereastra si o sa te convingi.

2. Am verificat la mine si se pare ca functioneaza corect: http://screencast.com/t/JIcXIL0x poate fii un conflict cu un plugin inceraca si verfica cu toate pluginurile dezactivate.

3. Daca introduci un link video in campul “featured video” video respectiv va fii afisat in locul imaginii la inceputul articolului, asigura-te ca ai setat post-ul ca si video pentru asta si sa nu ai selectat stilul 5 pentru postul respectiv, acela este fara imagine.

Multumesc!

Viewing 25 results - 1,001 through 1,025 (of 1,077 total)