No search results were found in Documentation!
Hello!
Once a demo is loaded the entire demo-style.css file corresponding to that demo will be loaded. If you remove the loading of this file, the demo will no longer receive the specific style. If you do not need to load css, you can simply use the cloud library and import the demo homepage and not use a demo at all on your install.
If you still want to remove the loading of the demo file, you can not do it from the child theme. You have to modify the main theme file:
td-composer/legacy/common/wp_booster/td_wp_booster_functions.php [line 414]
Hope that helps you somehow!
Thank you!
I need to remove this css
<link rel = 'stylesheet' id = 'td-theme-demo-style-css' href =' https: //www.******/wp-content/plugins/td-composer/legacy / Newspaper /includes/demos/style_pro/demo_style.css?ver=10.3.9.1 'type =' text / css' media = 'all' />
this file is empty and therefore I would like to remove it.
I tried so but don’t works (I’ve put the code in my functions.php child)
function dequeue_demo_style() {
wp_dequeue_style( 'td-theme-demo-style' );
wp_deregister_style( 'td-theme-demo-style' );
}
add_action( 'wp_print_styles', 'dequeue_demo_style', 1002 );
any idea?
Hello. On my website TheAEGISAlliance.com I have a few custom post types. I have code in functions.php that allows the custom post types to display in the category and tag pages.
I have some post blocks on the desktop version of the front page on my website created with the TD Composer that users are able to click on a category and view recent posts under those categories. But, on the front page, posts in custom post types aren’t displaying in these categories on the front page.
Is there some code I can add to functions.php to make them display? Or are there settings I don’t know about? I’m using the Newspaper child theme.
Please help. Thank you.
Hi everyone !
I’m using Newspaper theme for a client website.
For this specific website I wrote custom code into theme’s files for example in :
functions.phpheader.php- Woocommerce templates
- …
The problem I encounter right now is that when I upgrade Newspaper theme version, all custom codes I wrote on those files disapear.
I read the documentation about child theme so I just have this folder in my theme folder :
themes/Newspaper
Should I create a child folder like this : themes/Newspaper-child ?
What’s the best way to upgrade the theme and keep my custom code without deleting them ?
Thanks so much for your replies !
Hi denya, I think that it will be better to set it in a child theme in functions.php in this way you’ll not lose the settings after a theme update, also this will work.
Let me know the results!
Hi nitesh9291,
There is a code in our theme for this and for me is apply -> https://i.imgur.com/8SwVGP6.png unfortunately I do not know why is not working for all users, at the end we are using the same theme, only the host and plugins are others.
What you can do is to use a child theme and set that code in the functions.php from the child and it should not longer disappear.
Hope this will help!
Thank you for your understanding!
Hi gilean, what you an do is to use a child theme and set that code in the functions.php from the child and it should not longer disappear.
Hope this will help!
Thank you!
Hello, @gumball44
1.) Have you ever tested WP Fastest Cache? What is your experience with it? Especially compared to WP Super Cache.
I have never used WP fastest Cache plugin. I believe the fonts flash you are seeing is because of this plugin. I will suggest using WP Rocket plugin or WP Super cache plugin + Autoptimize Or Fast Velocity Minify.
For me WP Rocket working really well with these settings: https://www.infophilic.com/wp-rocket-settings-cloudflare/
2.) You say that Cloudflare can be used. Is the free version useful here too?
Yes, Cloudflare can be useful when you configure it correctly. For the blog site, free version is enough. But if you want more speed, then upgrading to PRO is a good choice.
3.) What is your experience with Gzip? Is it possible that Newspaper-Theme does not work with GZIP?
Yes, I am using GZIP with a Newspaper theme, and it works without any issue.
4.) By activating plugins my database has grown a lot. In my database there is a lot of data about plugins which I don’t use anymore. Does a large database damage the loading speed?
Definitely, having large options table in database affects site loading speed. You can consider using WP Sweep plugin to keep your site’s database clean. You can also reduce size of tables by removing Orphans options from tables.
5.) A question about the part “Removing Font Awesome”. With the code snippet only the essential icons are loaded. But which icons are essential? All the ones I select in the theme?
This is no more part of Newspaper theme optimization.
6.) You write that there is also a funcion.php for the mobile theme.
Is it possible to overwrite it with a child theme or do you have to add new entries after every update?
For example: Removing Emojis, Removing Font Awesome, or Preload Newspaper fonts.
Unfortunately, you can not overwrite mobile theme’s functions.php file using child theme. Hope, tagDiv team will fix this soon.
7.) There are several ways to add custom CSS. Where do you think it makes the most sense? In the Theme panel under Custom Code? Or rather under WordPress Design > Customizer?
Well, that is completely your choice. Adding CSS in theme panel or customizer will add it as inline CSS code on page. I prefer adding them to child theme’s style.css.
I hope you will find this helpful.
After update child theme, functions.php from “td-standard-pack” is making problems.
Hi kibiribi,
If you have set some code in theme functions.php you can use the child theme and set the code in the functions from the child, in this way the code will no longer be removed.
-> https://forum.tagdiv.com/the-child-theme-support-tutorial/
Hope this should help you!
Thank you!
Hi,
Please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
If the problem persist, please set this code in functions.php -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
add_action(‘admin_head’,function() { echo ‘<style>.td-gutenberg-editor .editor-styles-wrapper .wp-block {max-width:726px;}</style>’; });
Or you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel or FTP if possible. We will take a look. Include a link to this topic in the email.
Thank you!
Hi,
I’m trying add GTM via functions.php in Child theme.
header.php file line 17 has <?php wp_body_open(); ?>
child theme functions.php has
add_action( 'wp_body_open', 'Newspaper_child_body_open', 1 );
function Newspaper_child_body_open(){
?>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-#######"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<?php
}
and this code is not showing.
Hi RAJDEEP DAS,
Normally there should not be those kind of problems, but those can appear when the theme is not update correctly, or there is some plugin, security option that is prevent the theme update to be done correctly.
To help when those problems appear, we added in the theme panel settings a theme backup for the settings made in theme panel -> https://forum.tagdiv.com/import-export-theme-settings/ and you can restore a backup from there. Also when you update the theme all theme files that were edited will be lost, but in your case if you need to edit only the functions.php and style.css files then you can use the child theme that is coming with our theme, in this way the edit files from child will not be affected by theme update.
Thank you for your understanding!
Hello,
is it somehow possible to set the TagDiv Slide Gallery as the default option when creating new galleries?
Maybe custom code / function I can paste into the functions.php in the Newspaper Child Theme?
Users tend to forget to set the options right and the broken thumbnail view of wordpress does not look nice when viewing pictures.
Thanks in advance!
Hi,
Please try like this
// Preload Newspaper fonts for responsive theme (main theme)
function dns_prefetch_responsive()
{
echo '<link rel="preload" href="https://hastysurf.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?19" as="font">';
echo '<link rel="preload" href="https://hastysurf.com/wp-content/plugins/td-composer/assets/fonts/td-multipurpose/td-multipurpose.ttf" as="font">';
}
add_action( 'wp_head', 'dns_prefetch_responsive', 0 );
Hope this code to work.
Also if you are using a child theme, then the code need to be set in the child theme functions.php
Let me know the results!
You gave me the code and I pasted it in the child theme functions.php file as you can see in the image attached.
can I insert it in the main theme functions.php, If yes then where should I add, and if I am supposed to add a code in function.php then do I have to simply add it in the end or in a specific space ???
like I asked in image-2 in given link
I have no child theme, how can I make 1?
Is it possible to paste it directly in functions.php in theme editor?
Hello !
Please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
If the problem persist, please set this code in functions.php -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
add_action(‘admin_head’,function() {
echo ‘<style>.td-gutenberg-editor .editor-styles-wrapper .wp-block {max-width:726px;}</style>’;
});
Or you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel or FTP if possible. We will take a look. Include a link to this topic in the email.
Thank you !
Hi,
In order to reduce the time for icons you need add this code in head section:
// Preload Newspaper fonts for responsive theme (main theme) function dns_prefetch_responsive()
{
echo '<link rel="preload" href="https://hastysurf.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?19" as="font">';
echo '<link rel="preload" href="https://hastysurf.com/wp-content/plugins/td-composer/assets/fonts/td-multipurpose/td-multipurpose.ttf" as="font">';
}
add_action( 'wp_head', 'dns_prefetch_responsive', 0 );
This code can be set in a child theme in functions.php at the end of file -> https://i.imgur.com/KvX498h.png
In this way you do not need to do those steps after each theme update.
Hope this will help you!
Thank you!
So I fixed it by switching to the Newspaper theme instead of the child theme I’d created. Is there a recommended way to set up Newspaper child themes. All mine had was a stylesheet and a blank functions.php
Hi,
Please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
If the problem persist, please set this code in functions.php -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
add_action('admin_head',function() {
echo '<style>.td-gutenberg-editor .editor-styles-wrapper .wp-block {max-width:726px;}</style>';
});
Or you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel or FTP if possible. We will take a look. Include a link to this topic in the email.
Thank you!
My WP-Admin editor shows a very narrow editor, exactly as described by these two threads:
* https://forum.tagdiv.com/topic/edit-post-area-very-narrow-in-wp-dashboard/
* https://forum.tagdiv.com/topic/bug-in-paragraphs-width-when-editing-an-article/
I have taken your advice and done all of the following …
– Deactivated child theme (no change)
– Deactivate & clear cache (no change)
– Deactivate all plugins except tagDiv Composer (no change)
– Deactivate all plugins INCLUDING tagDiv Composer (this resulted in the correct column width)
– Included suggested code in functions.php (this created a critical fatal error)
I’ve reverted all these back to their original state so that the site can function.
Is there a way to get one of the basic templates via the Cloud Library? The templates that are built in to the theme match everything else on the site and work fine. The only issue is that bit of text. I was hoping you could tell me a function that was called that I could just place a custom version of in our child-theme functions.php.
Hello !
1. Please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
If the problem persist, please set this code in functions.php -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
add_action(‘admin_head’,function() {
echo ‘<style>.td-gutenberg-editor .editor-styles-wrapper .wp-block {max-width:726px;}</style>’;
});
Or you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel or FTP if possible. We will take a look. Include a link to this topic in the email.
2. Yes, you can make your sidebar smart as you can see here: https://www.youtube.com/watch?v=fa7GenCHcBU
3. That will require a css code. Please provide a link to your website in order to inspect.
4. That can be caused by a plugin conflcit. Check issue 1.
5. Check issue 1.
Thank you !
Hi,
Please make sure that you do not have a plugin conflict, please deactivate ALL plugins except tagDiv Composer, also if you are using child theme or cache plugin, deactivate them, clear all cache and try again.
If the problem persist, please set this code in functions.php -> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
add_action(‘admin_head’,function() {
echo ‘<style>.td-gutenberg-editor .editor-styles-wrapper .wp-block {max-width:726px;}</style>’;
});
Or you can send us an email at contact@tagdiv.com and provide admin login, as well as cPanel or FTP if possible. We will take a look. Include a link to this topic in the email.
Thank you!