- NewsmagAbove footer ads
- NewsmagSmart list ads
- NewsmagArticle ads
- NewsmagSidebar ads
- NewsmagHeader ads
Salut,
- Nu cred că m-am exprimat corect. Nu doresc să elimin acele widget-uri, ci doresc să le fac să apară unul lângă celălalt sau măcar să le dau aceeași dimensiune, deoarece cel Google este mult prea mare
- Am introdus codul acela și acum arată OK bannerul respectiv. Totuși, nu mai pot fi accesate butoanele stânga/dreapta din partea dreaptă a lui. De asemenea, precizez că am următorul cod în css http://www.screencast.com/t/4qKcSbVOF1U , iar în Temă>Parts>Header>Style 2 am
<div class="td-container test">, container-ul „test” fiind adăugat la indicațiile unuia dintre colegii tăi, deoarece, fără el, tickerul nu era afișat corect. Se mai pot face optimizări?
<?php echo do_shortcode('[td_block_trending_now header_color="#dd3333" category_id="22" limit="5"]');?>
</div> - Dacă e foarte complica, nu mă interesează deoarece nu este ceva într-atât de important. Știu că în trecut primisem un cod cu loop de la unul dintre colegi și îmi afișa reclama după x articole, însă odată cu Newspaper 6 acesta nu doar că nu a mai funcționat, ba chiar a provocat și unele probleme. Eventual, dacă mai primiți soliciătri și din partea altora, treceți pe lista de funcții noi pentru că n-ar fi rău să existe opțiunea de a adăuga reclame în categorii/etichete din setările temei
- Am urmat pașii, însă nu mai îmi apare conținutul pe acest stil > apare totul până la breadcrumb. Menționez că am făcut modificările așa cum ai precizat, atât în loop 1, cât și în td_module_single_base.php, unde am copiat codul de pe pastebin. Luați vă rog în calcul, pe viitor, îmbunătățirea stilului 1 (să nu mai afișeze atât reclama article top, cât și cea dedicată stilului, să afișeze reclama dedicată stilului deasupra conținutului, iar imaginea în stânga sau viceversa).
Mulțumesc!
Salut!
1)The footer widgets are found here: http://screencast.com/t/E8V4SkYU9A6 If youhave not modified the theme files, then you can remove your widgets from there.
2)you can remove the space using this css code:
.td_block_trending_now.td_block_wrap{
padding-bottom:0!important;
}
.test{
margin-bottom: 0!important;
}
.td-main-page-wrap{
padding-top:20px!important
}
(as a side-note: you have a container in there with a class called ‘test’ that also created white space)
3)To display ads between posts on a specific category page are required lots of customizations and also many tests in order to achieve the desired result. Basically you need to edit the loop for that specific category page such that to display a specific ad-spot after a given number of posts.
All this customizations falls beyond the support can offer you so if you’re not aware of the steps you need to take in this regard please consider hiring a freelancer to do this for you as we can’t offer custom services at the moment.
4)If you want to remove the ad on post style 1, you can do it from here: http://screencast.com/t/RRXPmQTF
For the top ad, it will be a bit trickier as the top ad displays on all post templates so you need to ad a few conditions to the code where the ad is being created. Please use this code: http://pastebin.com/b5ZWGEhf
and replace this part here: http://screencast.com/t/uiYhFyE0rF
This will disable the article top ad for post style 1 and now you can ad a custom ad in the top of the file with a do_shortcode function:
do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
And add it in the file like so: http://screencast.com/t/sKAM9mtVmj
Now if you do not have an article top ad, the text will fill the white space besides the featured image.
Thanks.
Hi
You can use one of theme’s ad-spots to display the ad. First insert the html ad’s code in one of custom ad-spots from theme panel > ads then use do_shortcode() function to display a banner ad on top of the page. Just edit the file corresponding with the header style used and add this code like here: http://screencast.com/t/itasx4W4T – http://screencast.com/t/FSgnXBREg3
do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
I’ve used custom ad 1 for this example but you can use any custom ad, just adapt the shortcode. For example if you use custom ad 5 the shortcode will be: td_block_ad_box spot_id="custom_ad_5"
Thanks!
Hi
You can use one of theme’s ad-spots to display the ad. First insert the html ad’s code in one of custom ad-spots from theme panel > ads then use do_shortcode() function to display the ad below the logo like here: http://screencast.com/t/p9KCCPun
<div class="new-ad">
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
</div>
Add this css in theme panel > custom code > custom css:
.new-ad{
clear: both;
}
I’ve used custom ad 1 for this example but you can use any custom ad, just adapt the shortcode. For example if you use custom ad 5 the shortcode will be: td_block_ad_box spot_id="custom_ad_5"
The result should be like here: http://screencast.com/t/HYBdDZM0W0h
Thanks!
-
This reply was modified 10 years by
Andrei L..
Thanks for your reply.
In the categories page i added the next code (and it work excellent):
$adcounter = 0;
$adcounter++;
if (is_category()) {
if ($adcounter == 1) {
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_4"]‘);
}
elseif($adcounter == 3){
echo do_shortcode(‘[td_block_ad_box spot_id="custom_ad_5"]‘);
}
}
How must i do to do the same in the search results page?
Thanks!
-
This reply was modified 10 years by
sapito.
Good morning
I with a plugin to insert advertising I exported these two codes:
<? Php echo do_shortcode (“[pro_ad_display_adzone id = ‘1516’ popup = ‘1’ cookie = ‘1’ delay = ‘180’ popup_auto_close_time = ’20 ‘]”); ?>
[Pro_ad_display_adzone id = “1516” popup = “1” cookie = “1” delay = “180” popup_auto_close_time = “20”]
To see ads in all post what should I enter? And where I have to paste?
Hello sapito,
If you want to add some Ads for your search page you have to edit the search.php core file in order to achieve as you wish. Also, you have to use the do_shortcode method for this implementation, like this -> http://screencast.com/t/nL5jmKdHjdD
The code is ->
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?>
Thank you for the message!
Hello,
Unfortunately we have not tested any translate plugins with our theme so we have no idea on their implementation.
Most plugins can make use of a shortcode. You can use a do_shortcode function: https://developer.wordpress.org/reference/functions/do_shortcode/
Here is the file that contains the header area: http://screencast.com/t/nJKoLoBo7od
Thanks.
Hi,
You can add this code:
<div style="padding-top:20px; margin-bottom:-90px!important;">
<?php echo do_shortcode('[td_ad_box spot_id="custom_ad_1"]'); ?> </div>
In the footer file like so: http://screencast.com/t/CQ90MHLTmqf
Make sure you have an ad in the custom ad 1 spot.
Thank you!
Hi,
You can edit loo-single-1.php from the rrot directory like so: http://screencast.com/t/jRjih2t0k
And add this code:
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
Make sure you have an ad in the custom ad 1 spot
Thank you!
Hello,
The best way to edit php is by accessing you files via ftp and using a text editor such as notepad++.
1) If you want to edit parts of the header then you need to access one of the header files: http://screencast.com/t/2zAba2Tj
You will need to kn ow a bit of css as well as it is used for the margins you need to alter in order to get your new dimansions to display properly.
2) If you want to add a shortcode for an ad spot at the bottom of the menu, then you need to menu file and use a do_shortcode php function like so:
do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?>
If you want to place an ad at the bottom of the menu, it’s best to add it inside what is below the menu, not the menu file itself.
In order to do this, you must edit the specific post template or category template or page template you want the add to appear on.
Thank you!
Hi,
This is strange indeed, You can try to add your custom ad shortcode in the single_template_2.php file here:
http://screencast.com/t/4zcCtQtx
If this still makes speedbooster stop working, maybe you could try another ad, like a simple image ad instead of adsense to see if there is any code related to the ad that creates this error.
I tested this on my end with the do_shortcode function both in the loop file or the single_template file, but there was no change in pagespeed and speedbooster worked as expected.
Thanks.
HI Andrei,
I found solution 🙂 this code display Slider on every category page:
$categories = get_the_category();
$category_id = $categories[0]->cat_ID;
echo do_shortcode ('[td_slide autoplay="3" category_id="'.$category_id.'" limit="5" td_filter_default_txt="All"]');
Hi
in loop-single-2.php I added the code
<? Php echo do_shortcode (‘[td_block_ad_box spot_id = "custom_ad_2"]‘); ?>
after
<? Php echo $ td_mod_single-> get_social_sharing_top ();?>
to insert an adsense banner after the title
in this way however seem to stop working the instructions in td-spped-booster.php to move down the css in particular with regard to fonts google
$ This-> move_style_to_footer_queue (‘google_font_open_sans’);
$ This-> move_style_to_footer_queue (‘google_font_roboto’);
$ This-> move_style_to_footer_queue (‘google-fonts-style’);
and speedsite is compromised…
Do You have any suggestions to solve this problem?
Thanks
Hi
I assume that you want to display the big grid on a specific category page. This can be done using is_category() function. This function returns true when a specific category page is displayed, you can read more details here: https://developer.wordpress.org/reference/functions/is_category/
In your case the code could be like this:
<?php
if (is_category('category-name')){
echo do_shortcode ('[td_slide autoplay="3" category_id="48" limit="5" td_filter_default_txt="All"]');
}
?>
Let me know how it goes and if this is not what you mean please provide more specific details about what you’re trying to do so I can inspect this closer and get back to you with a more accurate answer.
Thanks!
-
This reply was modified 10 years by
Andrei L..
Hello firetoss,
Unfortunately, Advanced Ads and AdRotate are not tested with our theme and we cannot provide support for these kinds of plugins, sorry! As a hint, you can use AdRotate plugin for your website because a lot of our users use it and was satisfied with it functionality. For more information about how to use this type of plugin, I recommend you to read the documentation plugin, here -> https://wordpress.org/plugins/adrotate/ If you want to place the ads in different parts of the site, you have to use the do_shortcode method. For more information about this method, please check this topic here -> https://forum.tagdiv.com/topic/how-to-call-ad-unit-in-php/
Hope this helps nad let us know how it goes!
If is not what you mean, please provide more details about your desired changes so I will be able to provide a more accurate response.
Thanks.
this can be accomplished by
<?php echo do_shortcode ('[td_slide autoplay="3" category_id="48" limit="5" td_filter_default_txt="All"]'); ?>
but we need autodetect category
Hello emil86,
Unfortunately, our theme does not have such an option for what you want but you can achieve that only for coding. If you want to have this feature on all posts above post title, you have to use do_shortcode method to implement this. For example, if you are using post template 1, you have to add the code below in loop-single-1.php, like this -> http://screencast.com/t/V6Cf3Yqsao
The code is ->
<?php echo do_shortcode('[td_block_trending_now]'); ?>
Thanks.
Hello todaybase,
If you want to change your permanent text with an image, you have to use the do_shortcode method. First of all, you have to create your image with the desired link from Visual Composer, like this -> http://screencast.com/t/H6zqscKH -> http://screencast.com/t/u3Bp3gu6aIgo and then you have to add this code, as an example in loop-single-1.php after your content, like this -> http://screencast.com/t/yzZw46rFvw
The code from y example look like this ->
<?php echo '<a href="http://todaybase.com/paul-okoye-talks-his-new-label-and-his-two-artists/" target="_blank" rel="attachment wp-att-932"><img class="alignnone size-medium wp-image-932" src="http://localhost/ziar_6/wp-content/uploads/2016/02/p2-198x300.jpg" alt="p2" width="198" height="300" /></a>'?>;
Hope this helps and let us know how it goes!
Thanks.
Hello ppcker,
If you want to have this text for each post above the article bottom ad, you have to insert the code below in td_module_single_base.php, like this -> http://screencast.com/t/L0Oc1jBci and the result you should see here -> http://screencast.com/t/geIgfmbuNKg
The code is ->
$content .= do_shortcode('[vc_column][vc_column_text]INSERT YOUR DESIRED TEXT HERE.[/vc_column_text][/vc_column]');
Thank you for the message!
Hello ppcker,
If you want to add a universal text below for all your posts, you have to use do_shortcode method and add this for all corresponding file to your post template used by you. First of all, you have to edit the text block with your desired text, like this -> http://screencast.com/t/sIdwp5aT -> http://screencast.com/t/f9SOma8H and then you have to create this code <?php echo do_shortcode('[vc_column][vc_column_text]INSERT YOUR DESIRED TEXT HERE.[/vc_column_text][/vc_column]'); ?> which you have to place in the code. For example, if I sue the post template style 1, you have to edit the loop-single-1.php, like this -> http://screencast.com/t/38R9rjgt and the result you should see here -> http://screencast.com/t/ka2l2IlwM
Hope this helps and let us know how it goes!
Thank you for the message!
Hello,
You can place the do_shortcode function anywhere you want in the file and test it out. It should work in all places if it’s added properly.
Thank you!
Hello,
Modules are different things altogether. In order to modify a module, you need to edit it’s file as there is no way to add a button in the module from the back-end. It will have to be hard-coded. Every module has it’s own specific file: http://screencast.com/t/bKA0L2PJ You will have to edit the files to add your button in it.
Here is an example:
You can use the do_shortcode function like so: http://screencast.com/t/2CXSDfGDZX
<?php echo do_shortcode('[vc_btn title="Click me" shape="round" color="violet" link="url:https://www.google.com||"]');?>
result: (module 1 is used in block 3): http://screencast.com/t/iqscQKkBM0f
You can see what module is used where in this list: http://screencast.com/t/xXHLgDoCRa
Thank you!
Hello mahmoudfathymohamed,
If you want to add some ads on your website and you do not have more settings about the specific place where you want to add the ads, you have to introduce them using do_shortcode method. First of all, please notice that you have inserted the ad code in your custom code 1,2,3,… from your Theme panel, like this -> http://screencast.com/t/YEBdvQZldkY and then you have to use this code ->> <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]'); ?> and paste it in the corresponding file to the desired place.
Hope this helps!
Thank you for the message!
Hello MrOrsh,
Unfortunately, our theme does not have such an option implemented to add some ads for your forum page. For achieving that, it is necessary to use do_shortcode method to add your custom ad in this kind of page. Please notice that you have to use this code <?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]');?> and you will place it in the bbpress.php core file, like this -> http://screencast.com/t/i6dr6auh2S2 and the result you should see here -> http://screencast.com/t/RTfHLss2RVpW In order to check your result, please ensure that you have inserted the ad code in the correct field, like this -> http://screencast.com/t/YEBdvQZldkY
(this is an example for custom ad 1).
Thank you for the message!