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,
Yes, a code like that should work, I think that this need to be set in theme functions.php to work, you can use a child theme for this and set the code in the functions.php from there.
Let me know the results!
Hello !
I am not sure I fully understand what you are looking to achieve. Please provide an example to see what you want to modify. You can edit functions.php and single-template.php if you are using child theme : https://forum.tagdiv.com/the-child-theme-support-tutorial/
Thank you !
Hi Simion,
Sorry I don’t have IT background. May you please advise where I can locate the child theme functions.php file and how I can add those functions in the file? (I’m using Siteground for hosting)
Thanks,
Hayes
I still have the same error td_post_template file functions.php line 59. Whether with the original theme and not the child theme, and all modules disabled except those of tagdiv. I’m on a Plesk server. PHP 7.3
Adding loop-single.php and single.php files to child theme didn’t help.
I have not changed the message template.
My files in child theme http://joxi.ru/l2ZxOzVC78qkPr
I added code in files:
functions.php http://joxi.ru/l2ZxOzVC78qNPr
style.php http://joxi.ru/GrqG48eIGNvxV2
And added the Images folder http://joxi.ru/8Anbe10Cyq687A
All other files are standard from the Newspaper-child folder
Hi phaseoneindustrial,
Usually for this you must add a new parameter, you ca check a guide for this -> https://www.wpbeginner.com/plugins/add-excerpts-to-your-pages-in-wordpress/
also if you are not using a child theme to set in the child functions.php file the code, then you need to set it in wp-content/plugins/td-composer/legacy/Newspaper/functions.php
Thank you!
Hi,
I’m using single post template 2 (https://snipboard.io/ScQGCs.jpg) and copied these 2 files(https://snipboard.io/79pibP.jpg) in the directory (public_html/wp-content/themes/Newspaper-child/parts/single) also added the code in single_template_2.php(https://snipboard.io/5LebI1.jpg) & loop-single-2.php (https://snipboard.io/OYywUF.jpg), also here is the code in functions.php (https://snipboard.io/ecHPRA.jpg)
Can you please tell me why it’s not showing multiple authors? as I have done all the things which were in the steps.
I made a recent post but it came off as more of a custom request, so I’m going to simplify my issue.
I’m trying to upload a child header page but I am getting a critical error when I do it.
I am using ‘style 3’ header, so when I upload header-style-3.php to /(mychildtheme)/parts/header/, I get a critical error. Why would that happen? Am I missing a file I need to upload?
Currently in my child theme, I have:
functions.php
style.css
screenshot.png
/parts/header/header-style-3.php
Thank you
Hi,
1. Unfortunately, we do not tested this plugin with our theme, therefore we do not know the plugin behavior and how it should work, also we can not provide support for it since we do not know how this should work. Also if the plugin can be use with shortcode in child theme and you set in as in our guide from here , then the shortcode set in functions.php should work if is compatible with our theme.
2. Using the mobile theme with amp plugin, the only settings that can be use are these from Theme panel> Mobile theme -> https://i.imgur.com/VkrPNjo.png -> https://tagdiv.com/mobile-theme-get-mobile-ready-with-newsmag-theme/
Thank you for your understanding!
Hi,
I’ve come back to Newsmag for my new website. All has gone well but I have a couple of questions relating to the theme.
1. I have implemented the filter within a child theme functions.php to enable shortcodes to work in the description of a post category. However, they don’t execute. I am using the MEKS Easy Maps plugin for location sensitive posts. Usually, this would work out of the box without a shortcode, but it doesn’t with this theme. So I thought I would try the shortcode option, but this doesn’t work either. I’m wondering if there is something within this theme that stops shortcodes working, even with the filter added to the functions.php.
This is the filter I am using:
add_filter( 'category_description', 'do_shortcode' );
2. AMP Theme – using the AMP Theme is it possible to exclude categories from showing in the Latest Articles and also on the Front Page Grid. While we can do this on the main website, we can’t with the AMP Theme. It would be useful to be able to filter out some pages, that we don’t want to appear on the front page of the AMP versions too.
Thanks
Mike
Hello support team,
My website is https://www.noobietech.com . My site score is very poor on GTMetrix. Any suggestions on how can I improve it?
I am using the wp-rocket cache plugin and CloudFront CDN at the moment.
Currently, my .htaccess looks like:
`
# BEGIN WP Rocket v3.6.2.1
# Use UTF-8 encoding for anything served text/plain or text/html
AddDefaultCharset UTF-8
# Force UTF-8 for a number of file formats
<IfModule mod_mime.c>
AddCharset UTF-8 .atom .css .js .json .rss .vtt .xml
</IfModule>
# FileETag None is not enough for every server.
<IfModule mod_headers.c>
Header unset ETag
</IfModule>
# Since we’re sending far-future expires, we don’t need ETags for static content.
# developer.yahoo.com/performance/rules.html#etags
FileETag None
# Send CORS headers if browsers request them; enabled by default for images.
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
# mod_headers, y u no match by Content-Type?!
<FilesMatch “\.(cur|gif|png|jpe?g|svgz?|ico|webp)$”>
SetEnvIf Origin “:” IS_CORS
Header set Access-Control-Allow-Origin “*” env=IS_CORS
</FilesMatch>
</IfModule>
</IfModule>
# Allow access to web fonts from all domains.
<FilesMatch “\.(eot|otf|tt[cf]|woff2?)$”>
<IfModule mod_headers.c>
Header set Access-Control-Allow-Origin “*”
</IfModule>
</FilesMatch>
<IfModule mod_alias.c>
<FilesMatch “\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$”>
<IfModule mod_headers.c>
Header set X-Powered-By “WP Rocket/3.6.2.1”
Header unset Pragma
Header append Cache-Control “public”
Header unset Last-Modified
</IfModule>
</FilesMatch>
<FilesMatch “\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$”>
<IfModule mod_headers.c>
Header unset Pragma
Header append Cache-Control “public”
</IfModule>
</FilesMatch>
</IfModule>
# Expires headers (for better cache control)
<IfModule mod_expires.c>
ExpiresActive on
ExpiresDefault “access plus 1 month”
# cache.appcache needs re-requests in FF 3.6 (thanks Remy ~Introducing HTML5)
ExpiresByType text/cache-manifest “access plus 0 seconds”
# Your document html
ExpiresByType text/html “access plus 0 seconds”
# Data
ExpiresByType text/xml “access plus 0 seconds”
ExpiresByType application/xml “access plus 0 seconds”
ExpiresByType application/json “access plus 0 seconds”
# Feed
ExpiresByType application/rss+xml “access plus 1 hour”
ExpiresByType application/atom+xml “access plus 1 hour”
# Favicon (cannot be renamed)
ExpiresByType image/x-icon “access plus 1 week”
# Media: images, video, audio
ExpiresByType image/gif “access plus 4 months”
ExpiresByType image/png “access plus 4 months”
ExpiresByType image/jpeg “access plus 4 months”
ExpiresByType image/webp “access plus 4 months”
ExpiresByType video/ogg “access plus 1 month”
ExpiresByType audio/ogg “access plus 1 month”
ExpiresByType video/mp4 “access plus 1 month”
ExpiresByType video/webm “access plus 1 month”
# HTC files (css3pie)
ExpiresByType text/x-component “access plus 1 month”
# Webfonts
ExpiresByType font/ttf “access plus 4 months”
ExpiresByType font/otf “access plus 4 months”
ExpiresByType font/woff “access plus 4 months”
ExpiresByType font/woff2 “access plus 4 months”
ExpiresByType image/svg+xml “access plus 1 month”
ExpiresByType application/vnd.ms-fontobject “access plus 1 month”
# CSS and JavaScript
ExpiresByType text/css “access plus 1 year”
ExpiresByType application/javascript “access plus 1 year”
</IfModule>
# Gzip compression
<IfModule mod_deflate.c>
# Active compression
SetOutputFilter DEFLATE
# Force deflate for mangled headers
<IfModule mod_setenvif.c>
<IfModule mod_headers.c>
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
RequestHeader append Accept-Encoding “gzip,deflate” env=HAVE_Accept-Encoding
# Don’t compress images and other uncompressible content
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
</IfModule>
</IfModule>
# Compress all output labeled with one of the following MIME-types
<IfModule mod_filter.c>
AddOutputFilterByType DEFLATE application/atom+xml \
application/javascript \
application/json \
application/rss+xml \
application/vnd.ms-fontobject \
application/x-font-ttf \
application/xhtml+xml \
application/xml \
font/opentype \
image/svg+xml \
image/x-icon \
text/css \
text/html \
text/plain \
text/x-component \
text/xml
</IfModule>
<IfModule mod_headers.c>
Header append Vary: Accept-Encoding
</IfModule>
</IfModule>
# END WP Rocket
# BEGIN YOAST REDIRECTS
<IfModule mod_rewrite.c>
RewriteEngine On
Redirect 301 “/how-to-install-laravel-6-on-windows” “/how-to-install-laravel-on-windows”
Redirect 301 “/top-10-best-free-web-hosting” “/best-free-web-hosting-sites”
Redirect 410 “/tdb_templates/review-template-4-gaming”
</IfModule>
# END YOAST REDIRECTS
<FilesMatch “.(eot|otf|ttf|woff|woff2)”>
Header set Access-Control-Allow-Origin “*”
</FilesMatch>
#BEGIN GZIP COMPRESSION
<IfModule mod_deflate.c>
<filesMatch “\.(js|css|html|php)$”>
SetOutputFilter DEFLATE
</filesMatch>
</IfModule>
#END GZIP COMPRESSION
# BEGIN WordPress
# The directives (lines) between <code>BEGIN WordPressandEND WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ – [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# php — BEGIN cPanel-generated handler, do not edit
# Set the “ea-php73” package as the default “PHP” programming language.
<IfModule mime_module>
AddHandler application/x-httpd-ea-php73 .php .php7 .phtml
</IfModule>
# php — END cPanel-generated handler, do not edit
# Start CloudFlare:noobietech.com rewrite. Do not Edit
RewriteEngine On
RewriteCond %{HTTP_HOST} ^noobietech.com
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
# End CloudFlare rewrite
`
and functions.php of child theme (I have added some stuff from the internet to make it faster.)
`
// Load Essential Fonts Awesome
add_filter( ‘noobietech_fontawesome_essentials’,’noobietech_fontawesome_essentials’ );
function noobietech_fontawesome_essentials()
{
return true;
}
// Removing Emojis
add_action( ‘init’, ‘noobietech_disable_wp_emojicons’ );
function noobietech_disable_wp_emojicons()
{
// all actions related to emojis
remove_action( ‘admin_print_styles’, ‘print_emoji_styles’ );
remove_action( ‘wp_head’, ‘print_emoji_detection_script’, 7 );
remove_action( ‘admin_print_scripts’, ‘print_emoji_detection_script’ );
remove_action( ‘wp_print_styles’, ‘print_emoji_styles’ );
remove_filter( ‘wp_mail’, ‘wp_staticize_emoji_for_email’ );
remove_filter( ‘the_content_feed’, ‘wp_staticize_emoji’ );
remove_filter( ‘comment_text_rss’, ‘wp_staticize_emoji’ );
}
// Remove WP embed script
function noobietech_stop_loading_wp_embed() {
if (!is_admin()) {
wp_deregister_script(‘wp-embed’);
}
}
add_action(‘init’, ‘noobietech_stop_loading_wp_embed’);
// Preload Newspaper fonts for responsive theme (main theme)
function dns_prefetch_responsive() {
echo “<link href=’https://www.noobietech.com/wp-content/themes/Newspaper/images/icons/newspaper.woff?17′ rel=’preload’ as=’font’ type=’font/woff’ crossorigin>”;
}
add_action( ‘wp_head’, ‘dns_prefetch_responsive’, 0 );
`
Hi chicky365,
Our theme has more functions.php file please make sue that you set the code in these files:
-> wp-content/plugins/td-standard-pack/Newspaper/functions.php
-> wp-content/plugins/td-composer/legacy/Newspaper/functions.php
Also you can set this file in a child theme -> https://forum.tagdiv.com/the-child-theme-support-tutorial/
Hope this will help you!
Thank you!
Hello,
Has there been any progress on this question? Saying it is “a bit tricky to achieve” is not very helpful. I’ve searched the documentation and forums but have not found an answer.
I have the latest version of Newspaper installed with a child theme, use a CPT and need to be able to set custom archive and single template options with specific headers and footers. I have copied single-<CPT-Name>.php file into the child theme and gutted parts to display the CPT content. However, I’d like to be able to use standard TagDiv headers and footers rather than manually rewrite versions of all the header.php and footer.php files.
I don’t mind coding.
If there isn’t a GUI way to call specific headers and footers for a CPT, is there a code reference say, that in the child theme functions.php file if post_type = X then use header Y & footer Z?
Thank you for your help.
Best,
Don
Hi tizian-ffm,
Our theme do not have an option for this, you can try a custom css, but this will work only inside the post/article, on modules/blocks will not work, for example -> https://i.imgur.com/T5gKFIf.png -> https://i.imgur.com/EJMH9iX.png
As a hint you can use in child them functions.php a code that identify the category id something like this
if (get_category('53')){
echo '<style>
.entry-title a::before {
content: "test";
margin-right: 10px;
}
</style>';
}
Hope this will help you!
Thank you!
Hi,
If that code is set a functions, then you need to set it in mobile functions too -> wp-content/plugins/td-composer/mobile/functions.php
The wp-content/plugins/td-composer/mobile/ can not be set in a child theme only the files specific in our documentation can be set in child theme.
Thank you!
Hi
I am using NewspaperX theme. (functions.php unchanged. I totally removed my child theme directory from themes dir.)
I’ve noticed categories (page: /?cat=112 for instance) are showing no posts while instead there are one or 2 posts.
I activated query monitor plugin and I found the get_posts main query WP_Query->get_posts()
has a LIMIT 2,10 which I do not understand where it comes from.
By switching to theme twentytwenty the query correctly set and executed with LIMIT 0,10
Query with NewspaperX theme:
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (112) )
AND wp_posts.post_type = 'post'
AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'active'
OR wp_posts.post_status = 'inactive'
OR wp_posts.post_status = 'expired'
OR wp_posts.post_status = 'private')
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC
LIMIT 2, 10
Query with Twentytwenty theme
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID
FROM wp_posts
LEFT JOIN wp_term_relationships
ON (wp_posts.ID = wp_term_relationships.object_id)
WHERE 1=1
AND ( wp_term_relationships.term_taxonomy_id IN (112) )
AND wp_posts.post_type = 'post'
AND (wp_posts.post_status = 'publish'
OR wp_posts.post_status = 'active'
OR wp_posts.post_status = 'inactive'
OR wp_posts.post_status = 'expired'
OR wp_posts.post_status = 'private')
GROUP BY wp_posts.ID
ORDER BY wp_posts.post_date DESC
LIMIT 0, 10
it must be theme related (or plugin’s theme related).
This happens with every category.
So my question is
Is there anything I can check to see where that limit starting from record #2 is set?
Hi,
I want to make changes to the general default single post template via php
As I’ve already searched through all of the documentation on how to work with child themes, my final understanding seems to be that only the templates 1-13 can be edited with a child theme but not the default post template?
So then I wanted to create a solution that is most likely update-proof and requires little effort to update.
I’ve created a hook: <?php do_action(‘after_single_post_footer’); ?>
In the /wp-content/plugins/td-standard-pack/Newspaper/loop-single.php:67
and then call the hook from my /wp-content/themes/newspaper-child/functions.php
add_action(‘after_single_post_footer’,’add_read_further’);
function after_single_post_footer () {
//some function
}
However this will not work. The only way I seem to be able to add actual content is when hardcoding the HTML into the loop-single.php, which is what I wanted to prevent.
Just in case, I’ve tried creating a page with the Cloud Templates and also was thinking about the API, but then again you seem only be able to edit the templates 1-13 but not the default one.
We have just over 2000 posts that are set to default template manually, so adding a new one is out of the question, as I wont manually change all of them.
Do you have any ideas on how I might be able to change the default post template via php such that I have a theme update proof solution?
Hi,
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>';
});
If you are using a child theme, make sure that it is set as in our guide from here -> https://forum.tagdiv.com/the-child-theme-support-tutorial/
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 smaralind,
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>';
});
If you are using a child theme, make sure that it is set as in our guide from here -> https://forum.tagdiv.com/the-child-theme-support-tutorial/
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,
1. There are two possibilities that can provide this problem.
a. The thumb is not generate correctly, this can be fixed using our guide from here -> https://forum.tagdiv.com/thumbnails-fix-strange-looking-images-on-blocks/
b. Is possible to be 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.
2. The image is not appear because not all your posts and pages has set the featured image -> https://forum.tagdiv.com/featured-image-or-video/
Unfortunately there is no option to filter the results from search page, but it can be achieve using a function: How to Exclude Pages from WordPress Search Results.
I recommend to set the code in functions.php from child theme, in this way you’ll not lose the changes when you’ll make a theme update.
Thank you!
Hi,
It didn’t work. We put it in the child theme functions.php
Hi,
As I said above, that is a general option, will remove the avatar from everywhere in theme and WordPress.
In order to help you I made a function that detects the avatar from comments and is stop it to be load, also this function can be set in functions.php in child theme, you can get it from here -> https://pastebin.com/XhPuW8ZE
Hope this will 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,
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!