- Apitd_api_single_template::update_key
- Apitd_api_single_template::update
- Apitd_api_single_template::add
- ApiAPI – Single Template – Introduction
- ApiPractical example – How to add a new Block and Module
- ApiAPI – Category top section style – Introduction
- Apitd_api_module::update
- Apitd_api_module::add
- ApiAPI – Modules – Introduction
- Apitd_api_block::update
- Apitd_api_block::add
- ApiAPI – Blocks – Introduction
- ApiUsing the Theme API in plugins
Hi..
I need to place ad code on post page… when I added the code in “loop-single-5.php” which is default post template for my site.
Ads weren’t showing up.
I want to place the add codes below the social share button.
Thanks!
Hi
To achieve that you have to change the page structure a bit. You can use the page template default and add a new block to duplicate the latest article part. You can use block 3 for example to reproduce this part of your site: http://screencast.com/t/8a1cBZ4Vyc Your layout in Visual Composer should be similar with this one: http://screencast.com/t/tuRD1YJNSC To make the sidebar scroll down with the page you have to make it sticky: https://forum.tagdiv.com/newsmag-smart-sidebar/ – http://screencast.com/t/5avIgqnDO1
Hope this help.
Thanks!
Thanks Chris
The thing is that I can’t see the Visual Composer page loading, even when I create a new page from scratch.
When I click on “Backend editor” all I see is the Visual composer canvas, not the “start with a template” screen. Just the blank canvas
Hello friends
I have a site with 4 pages. The first page (home) worked ok and I can add and edit using Visual Composer. However, everytime I try to do the same on the other pages, the visual composer shows correctly, the “Add element” is also shown but when I click on an element it won’t appear on the main page.
I tried using templates and so on, but to no avail.
Any suggestions?
Theme name i Newspaper
Theme version i 6.6
Theme database version i 6.6
Theme aurora version i 1.1
php.ini configuration
Server software i Apache
PHP Version i 5.6.15
post_max_size i 8M – You cannot upload images, themes and plugins that have a size bigger than this value. To see how you can change this please check our guide here.
max_execution_time 50000
max_input_vars 5000
SUHOSIN installed false
WP version i 4.3.1
WP multisite enabled i No
WP Language i en_US
WP Memory Limit 40 MB/request – We recommend setting memory to at least 64MB. The theme is well tested with a 40MB/request limit, but if you are using multiple plugins that may not be enough. See: Increasing memory allocated to PHP. You can also check our guide here.
WP_DEBUG False
Caching plugin No caching plugin detected – for best performance we recommend using WP Super Cache
Try to setup the slideshow on my homepage, have setup everything like documentation tell. Even disable all my plug-ins to make sure it is not an conflict. I have made an template with one slide (more comes..). Then I create an page and pick the template I have made from the dropdown menu in page settings. Then I save and open the page to see the result, but no slideshow. Why? When I create a slideshow and set in the shortcodee the slideshow comes up, but cover the sidebar and other element since I choose fullwidt I supose. Have set in the tag #header in the field “Offset Containers:”. Please help me with this issue.
Hi, the slider doesn’t work for every page on my website. I uses the same template for all my pages and changed the categories ID to the specific pages. But it didn’t work.
Hello schindyguy,
If you are talking about the ads on category page, the simplest way to add this on that pages are to use a shortcode for each category top post template used, like this: http://screencast.com/t/icImxD0wIoVc
<?php echo do_shortcode('[td_block_ad_box spot_id="custom_ad_1"]')?>
Also, if you need to remove ads from certain post/pages, please check the topic below and implement this on your custom post type. https://forum.tagdiv.com/topic/remove-ads-in-certain-postpage/ You should put the condition in ads.php using a custom post type function. For more function reference in WordPress, please check the WP Codex, here: https://codex.wordpress.org/Function_Reference
If you are not aware the steps to do this thing, please consider hiring a freelancer/developer to do this thing for you, because we cannot provide custom work for the moment, sorry!
Hope this helps and let us know how it goes!
Thank you for the message!
Hi
Try to deactivate the lazy load animation from theme panel: http://screencast.com/t/zHmGOzLi6Oc8
I am not sure how you set up your homepage but if you’re using the blog template you can change the module used to display the post with one which display excerpts: http://screencast.com/t/yRypVzWjP – http://screencast.com/t/pebH7hrP1b For more details please check our documentation regarding the homepage setup: https://forum.tagdiv.com/newsmag-homepage-how-to-build-and-set-it/
IF this is not what you mean please provide more details and your site url so I can inspect this closer.
Thanks!
Hi @MissMyra
I’ve checked your site and noticed that you’re using page-builder + latest as a page template. Using the default sidebar options from page settings will affect only the latest article part: http://screencast.com/t/hyQbkDdCINTz not the one built with Visual Composer page-builder. To add the sidebar here: http://screencast.com/t/XahYbpuDd you have to use a widgetized sidebar block from visual composer like here: http://screencast.com/t/YbNfZtxNu Also make sure that you empty all caches then test the site again.
Let me know how it goes.
Thanks!
Hello. Tell me please. How to make custom td_config.php. The problem is that I made a few extra page templates and add-ons for Visual Composer. They are connected to td_config. When the updated newspaper, td_config.php overwritten. How do I win?)) I’m sorry for my English =)
Hi Chris,
RE: “If you’re not interested in comments, likely not good to post on a forum for replies”
I’m not interested in a certain type of comment, as stated ” I’m numb to all the yoast subgurus that say they have it installed and no problems… not interested in those comments.”
Honestly I’m fed up with the slick marketers who are peddling these plugins and filling up the results in Google with positive reviews. It has not been a positive experience for me. Since I started using Yoast (and honestly this template) my income has sank 75%. My traffic has crashed. I refuse to believe it is this template. We have a right to use a nice template (and it is nice looking) and it’s up to Google to keep up with the code of these great new templates. I shouldn’t have to use a crappy Genesis template or whatever, so I’m sticking with Newspaper.
However I’m not so convinced Yoast is a good thing.
There is a pro and con to everything. it drives me crazy.
My site has 60 posts. Al unique hand crafted content. No duplicates. So why do i need the rel canonical tag?
The yoast plugin does not allow removal of the rel canonical tag (Greg’s high performance seo does)
I”m still looking into all of it and will report what I find, but am getting tired of 9 google visitors a day, when I used to have hundreds….
see: https://moz.com/blog/rel-confused-answers-to-your-rel-canonical-questions
“As my catastrophic canonicalization experiment and follow-up experiments showed, Google does honor rel=canonical even on very different pages, in some cases. That doesn’t mean that it’s a good idea. Generally speaking, I think it’s best to reserve rel=canonical for duplicates or very-near duplicates.”
Update: Continues to happen with no plugins activated. Although someone posted similar problem with yoast seo plugin and someone replied
Yoast SEO plugin will use get_the_excerpt as og:description and it’ll output it by default.
the default filter of get_the_excerpt: wp_trim_excerpt will use the_content as excerpt when post doesn’t have a native excerpt.
my solution is disable the get_the_excerpt in that particular page.
Maybe your template does the same thing? I don’t know, just wish it would stop generating multiple pages, i.e. /contact-us/page/3/, /contact-us/page/4/, /contact-us/page/5/ etc
I want to remove page number from the title. It is seen only for latest articles template. There is no page number for the title of category pages.
I have a custom code to use for all pages and it is working well. but it duplicates the page number on latest articles templates because there is already one for that. the title becomes like this (website – page 2 – page 2)
So just tell me how to remove yours.
Thanks
Hi!
I have updated theme, wp and plug ins, but WP Antivirus Site Protection still send warning for this files:
“””””””””””””””””””
WP Antivirus Scan Results
Latest Scan Result
No files for review.
Review is required
/wp-content/plugins/js_composer/config/templates.php
/wp-content/plugins/maintenance/js/select2/select2.min.js
/wp-content/plugins/w3-total-cache/lib/CSSTidy/data.inc.php
/wp-content/plugins/google-pagespeed-insights/google-api/src/contrib/Google_AnalyticsService.php
/wp-content/plugins/js_composer/include/classes/editors/class-vc-frontend-editor.php
/wp-content/themes/Newspaper/includes/wp_booster/wp-admin/panel/td_view_import.php
/wp-content/themes/Newspaper/includes/wp_booster/wp-admin/panel/td_view_import_export_settings.php
* Please note: Hackers can inject malware codes inside of the normal files. If you delete these files, website can stop to work or will be not stable. We advice to send request to SiteGuarding.com for file review and analyze.
“””””””””””””””””””
Notice, I have update all this files and plug ins and theme tonight, and still this morning the WP Antivirus Site Protection marked this as potential malware.
Please help.
Regardless of which article display view option I choose in search template in the theme panel, the search results only show one article per page. For instance if I select option M1 in the search template choices in the theme panel and I search for a term that has 20 results, the search result page will show one article with 20 pages instead of 5 articles per page with 4 pages as option M1 indicates. Even if I change to a different option in the search template in the theme panel, I still only get one article per page in the search results.
Any thoughts on how to fix this?
I cannot use the themes “header” ad slot because I have a custom post type for sponsored articles I do not want adsense appearing on (and additionally slowing down the load time of the sponsored posts). My dev created a /s/ slug to represent the sponsored post type and we tried adding a conditional to the header ad slot to not load the adsense responsive code when /s/ is present in the url but while we were successful in hiding the ad (a big no no for google) the ad scripts still appear and slow down the load time so I’ve had to abandon using the header ad slot all together. If you have any other suggestions to prevent adsense header ad slot from loading ads/adsense scripts on a certain “sponsored” post type or urls that have /s/ in them please let me know – otherwise I have been forced to use the workaround:
I created a custom ad slot 1 with google responsive code on the homepage using VC which works, but I don’t have the same ability to do that on category pages. The theme panel > layout settings > categories section seems restrictive in how it can be customized. How would I add a “custom ad slot 1” ad to the top of every category page? Similarly, how can I define a post template to use “custom ad slot 1” as a header (almost all of my posts are set to default or from panel post templates)?
Thanks in advance for reading all that! Looking forward to your reply
Hello eyesandvoice,
You can achieve this if you use a bit of Css to hide the category title on your page. You should place the code below in Theme panel->Custom Css area, like this:
.td-page-title {
display:none;
}
.td_category_template_7 .td-category-title-holder {
padding-top: 0;
}
If you use a different template per category, it is also necessary to replace .td_category_template_7 with category_template used to apply the code above.
The result you should see here: http://screencast.com/t/PbxWPfOS
Hope this helps and let us know how it goes!
Thank you!
Hello,
I understand what you mean now, and there is a an explanation for it.The featured image uses a thumbnail while images inserted into a post use the full size. So when compressed on a mobile phone, the difference will be visible between a full size image ex: 1920×1080 and the thumb used by the theme for featured image which has a size of 696×0. This choice was made for pagespeed. You can override this thumbnail if you want by editing the theme files. You need to edit the template you use. Every post template has a separate file corresponding to it:
http://screencast.com/t/YBaK9ToiDFm Inside these files you will find the code used for image and the thumbnail: http://screencast.com/t/irKCRL3Qm You siumply need to change the td_696x0 to full and then the full image will be used for the featured image.
I hope this helps.
Thank you!
Hello,
I’d like to customize 404 template page.
By default it shows post with default title(“Latest Posts”). I would like to customize that.
Screenshot:-
http://www.screencast.com/t/x95Gi2e6
Please could you advice.
Thanks for checking into this Chris.
Here’s the link to my homepage: http://tech-diggers.com
You will see the quotation marks at the top of the page and it comes up on every single post and page as well.
I tried disabling all the plugins and still it was there.
I haven’t edited any template, that’s why i’m not sure where it’s coming from.
Hi. I have a follow up to this. I can see we can identify posts manually this way and hide the ads.
However, the ad code is still being run and served, it is just hidden by the CSS attribute. This seems like a very concerning situation with Google or other ad platforms. If they find they are serving ads and charging for impressions, but the ads are not displayed, we would definitely lose our account.
I am not sure CSS will work. We need a page or post template where the ad units are not inserted to begin with. Just like a “Simple page” that has the header and footer, but no ads inserted at all.
Or are there any other suggestions on how to do this correctly?
Thanks!
-
This reply was modified 10 years by
clubfred.
Link to example page might be helpful 🙂
And of course if you manually edited the header template or any other template you would want to undo that.
Also try turning off *all* plugins except for Visual Composer to see if it goes away, then you know it’s a bad plugin.
I deleted all of the “loop” files from FTP and re-uploaded new ones from the re-downloaded theme. Nothing…
The liip.php file that I’ve got:
<?php
/**
* If you are looking for the loop that's handling the single post page (single.php), check out loop-single.php
**/
// $global_flag_to_hide_no_post_to_display - comes from page-category-big-grid.php and is a flag to hide the 'No posts to display' message if on category page there are between 1 and 5 posts
global $loop_module_id, $loop_sidebar_position, $global_flag_to_hide_no_post_to_display;
///if we are in wordpress loop; used by quotes in blocks to check if the blocks are displayed in blocks or in loop
td_global::$is_wordpress_loop = true;
$td_template_layout = new td_template_layout($loop_sidebar_position);
if (empty($loop_module_id)) { //not sure if we need a default here
$loop_module_id = 1;
}
$td_module_class = td_api_module::_helper_get_module_class_from_loop_id($loop_module_id);
//disable the grid for some of the modules
$td_module_api = td_api_module::get_by_id($td_module_class);
if ($td_module_api['uses_columns'] === false) {
$td_template_layout->disable_output();
}
if (have_posts()) {
while ( have_posts() ) : the_post();
echo $td_template_layout->layout_open_element();
if (class_exists($td_module_class)) {
$td_mod = new $td_module_class($post);
echo $td_mod->render();
} else {
td_util::error(__FILE__, 'Missing module: ' . $td_module_class);
}
echo $td_template_layout->layout_close_element();
$td_template_layout->layout_next();
endwhile; //end loop
echo $td_template_layout->close_all_tags();
} else {
/**
* no posts to display. This function generates the __td('No posts to display').
* the text can be overwritten by the themplate using the global @see td_global::$custom_no_posts_message
*/
echo td_page_generator::no_posts();
}
is your theme directory actually at that location, or is that just an example of typing a page and WP generating a page vs a 404?
You might also simply rename index.php to index.html or something ?
Hm. Actually you do what that page accessible as it’s used by WordPress to generate default page templates.
Here Code in our Newsmag theme is different from the link you given , So send me the correct code to fix this
<?php
/* —————————————————————————-
the blog index template
*/
get_header();
//set the template id, used to get the template specific settings – this was the old home.php template
$template_id = ‘home’;
//prepare the loop variables
global $loop_module_id, $loop_sidebar_position;
$loop_module_id = td_util::get_option(‘tds_’ . $template_id . ‘_page_layout’, 15); //module 1 is default
$loop_sidebar_position = td_util::get_option(‘tds_’ . $template_id . ‘_sidebar_pos’); //sidebar right is default (empty)
?>