- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsDefault Block Settings Guide
- TutorialsHow to use custom fonts
First of all thank you Calin for helping and guiding me. I am attaching some images to you which I have named step by step and have tried to show you some issues in them.
https://we.tl/t-2dBWGFqVKZ
As far as I understand these 4 are important files for the theme and my website also
For CSS
1.https://mahakaltimes.com/wp-content/themes/Newsmag/style.css?ver=5.4.3.1
2.https://mahakaltimes.com/wp-content/plugins/td-composer/legacy/Newsmag/assets/css/td_legacy_main.css?ver=e5fcc38395b0030bac3ad179898970d6x
3.https://mahakaltimes.com/wp-content/plugins/td-composer/legacy/Newsmag/includes/demos/magazine/demo_style.css?ver=5.4.3.1
Calin I need your help for unused css and javascript. I have tried a lot but I am not able to get the actual unused css and js out. I also tried to get it out by going to Google Chrome DevTools Coverage and implemented it. My website is completely breaking. I have also used some website like PurgeCSS, UnCSS Online, CSS-Remove, PageSpeed Insights. Some plugins like Asset CleanUp and many more. So can you please provide me the unused CSS or JS for my website which is not being used so that my problem will be solved or you have any other option which can help me to solve this problem?
Hello Mark!
A workaround could be to add any other elements in the white space in the tablet viewport in the tagdiv Composer. Then, hide it on other viewports and make it visible only where you need it. Each element has the option to hide it in the CSS tab: https://prnt.sc/1FJiMub9ke4s
Or change the structure of your elements from that row.
Thank you!
Hello,
If you have a “Single Post Bg Featured Image”, the image alt description and title description will not be displayed because the image will be set as a background with css, not as an image element (img HTML).
Thank you!
Hello,
Unfortunately, our tagDiv team doesn’t have an employee named Carlos. From what I see there, that person has installed some malware plugins on your site, so you’ll need to manually clean the site. For example, you should delete plugins with strange or unknown names, remove any users you don’t recognize, and clean any suspicious code files, both in the theme and WordPress.
You could consider reinstalling the WordPress version, and checking for this plugin wp-zexit.php. It might be wise to inspect via FTP if it doesn’t appear in the WordPress -> Plugins. Additionally, using Wordfence to scan the website and remove unknown users would be prudent.
Change admin passwords and delete admin accounts you are not familiar with;
– Delete any weird/unknown plugins;
– Delete the weird/unknown themes;
– Clean unfamiliar Theme Panel injected code (example – https://i.imgur.com/4q70kCv.png);
– Clean WordPress files (example – https://i.imgur.com/stJCqiK.png)
Please block /wp-json/tdw/save_css
If an attacker wants to target this URL /wp-json/tdw/save_css they can do so. Even if the website uses a different theme, the attacker can still try that URL. We could add an option to be able to enable/disable the Live CSS, it will be considered. But for now in order to remove it this can only be done with a modification to the composer plugin. I think that all that removing it requires is to comment this line of code – https://prnt.sc/RtwvL5Nc4ikR -> https://prnt.sc/ymZmhdUfp57U But as I mentioned, the attacker can still try to access the URL.
Thank you!
Hi,
Ok, so FlyingPress provide separate cache for mobile is you are using this cache, this is recommended by the FlyingPress if you are not using the responsive version- https://docs.flyingpress.com/en/article/generate-separate-cache-for-mobile-p7a3vn/
Now in case that the problem is still persisting, please try this custom css (and remove ethe one prom previous reply)
@media (max-width: 767px) {
.header-search-wrap .td-icon-search {
font-size: 27px;
padding-top: 8px;
}
#td-top-mobile-toggle i {
font-size: 26px;
line-height: 55px;
padding-left: 13px;
display: inline-table;
vertical-align: middle;
color: #efefef;
}
.td-main-menu-logo img {
width: auto;
}
}
The code needs to be set between style /style tags – https://we.tl/t-IxgVEt38Tr
-
This reply was modified 1 year by
Calin.
Hi josedossier, I just checked and it appears to be a problem relate to opacity when you use the pagination the thumbs do not change the opacity from 0 to 1. The first suggestion will be to disable the lazyload option from the theme – https://i.imgur.com/XbAhJEO.png
If the above suggestion is not resolving the problem, the next move will be to use a custom css like this one:
body.td-animation-stack-type0 .post img {
opacity: 1;
}
Set the code in the theme panel > custom code> custom css – https://i.imgur.com/5DKMe0O.png
I hope this will help you!
@Bettina you said; “Unfortunately, you can only display the title and URL of the post you selected in the post object field, not other data from that post.”
What i want to achieve is when i write about a song. I pick an artist in relationship with this song so I don’t have to fill out the same info about the artist.
I tried PODS but when trying to display a list of latest custom posts the entire mobile template is looking messed up
Below is my code:
function display_custom_song_list() {
$pods = pods('tleg_song', array(
'limit' => 9,
'orderby' => 'post_date DESC',
));
if (!empty($pods) && $pods->total() > 0) {
ob_start(); // Start output buffering
echo '<div class="songs-container">';
while ($pods->fetch()) {
$song_title = $pods->field('song_title');
$album_cover = $pods->field('album_cover');
$album_cover_url = $album_cover ? pods_image_url($album_cover, 'thumbnail') : '';
$permalink = $pods->field('permalink');
$post_id = $pods->field('ID');
echo '<div class="song-item">';
if (!empty($album_cover_url)) {
echo '<div class="album-cover"></div>';
}
$genre = wp_get_post_terms($post_id, 'genre');
if (!empty($genre) && !is_wp_error($genre)) {
echo '<div class="genre-box">';
foreach ($genre as $term) {
echo '<span class="genre-tag">' . esc_html($term->name) . '</span>';
}
echo '</div>';
}
echo '' . esc_html($song_title) . '';
$related_artists = $pods->field('stage_name');
if (!empty($related_artists)) {
if (is_array($related_artists)) {
$artist = reset($related_artists);
$artist_id = is_array($artist) ? $artist['ID'] : $artist;
if ($artist_id) {
$artist_pod = pods('tleg_artist', $artist_id);
$stage_name = $artist_pod->field('stage_name') ?: get_the_title($artist_id);
echo '<div class="stage-name">' . esc_html($stage_name) . '</div>';
}
} elseif (is_string($related_artists)) {
echo '<div class="stage-name">' . esc_html($related_artists) . '</div>';
}
}
echo '</div>'; // End of song item
}
echo '</div>'; // End of songs container
ob_end_flush(); // Output the buffered content
} else {
echo 'No songs found.';
}
}
add_shortcode('display_songs', 'display_custom_song_list');
See screenshot:
https://i.ibb.co/yVgk5x7/image.png
It’s not css but PODS and how newspaper is built because always code clean and stylize later.
I have figured out one of these problems — the not being able to save anything. I had to go back to PHP 7.4 (down from 8.1). I can now save things.
BUT…my malware program has flagged these files (list below) from your TD Composer as MALWARE.
!…/capcitynews/wp-content/plugins/td-composer/assets/js/style.php
!…/capcitynews/wp-content/plugins/td-composer/css-live/assets/style.php
!…/capcitynews/wp-content/plugins/td-composer/css-live/assets/wCBsc
!…/capcitynews/wp-content/plugins/td-composer/css-live/includes/td_live_css_ajax.php
!…/capcitynews/wp-content/plugins/td-composer/td-multi-purpose/header/js.php
!…/capcitynews/wp-content/plugins/td-newsletter/viwphleq.php
Hello,
You can use this code @media screen and (max-width: 1540px) and (min-width: 1141px) {
.tdc-row.stretch_row_1400, .tdc-row-composer.stretch_row_1400 {
width: auto !important;
max-width: 1116px;
}
}
Set the code in Theme Panel – Custom code – custom CSS.
Thank you!
Hi urishtaujjain,
I the cache plugin you are using set to create a different cache for mobile version?
For the elements that are changing the dimension it is possible to be first display a dimension and after that to load the new one (this can be also a custom css set in theme panel in css for mobile and it should be load faster in head of using the media tags, so if you have)
@media only screen and (max-width: 600px) {
}
Thank you!
Hello!
A low text-to-HTML ratio means there is relatively little visible text content compared to the amount of HTML code on the page. This can negatively impact SEO because search engines prefer content-rich pages. To address this issue, here are several strategies you can implement:
1. Reduce Excessive HTML Code
Clean Up Inline CSS and JavaScript: Tools like WP Rocket or other caching plugins can help.
Remove Unnecessary HTML Markup: Ensure your HTML is clean and doesn’t contain redundant tags or attributes.
2. Add More Text Content
Increase the amount of meaningful, well-written text on your page. Focus on including relevant keywords and addressing user intent.
Use Alt Text for Images: Ensure that every image has descriptive alt text, which not only improves accessibility but also adds content to the page for search engines.
Use Descriptive Headers: Include H1, H2, H3 headers to structure your content. This increases readability and enhances your SEO.
3. Optimize for Core Web Vitals
Reduce Unnecessary Scripts and Plugins: Remove unnecessary plugins or extra scripts from your page. Too many scripts can increase the size of your HTML document.
Lazy Load Images: Implement lazy loading for images so they don’t bloat the initial HTML load.
4. Optimize Embedded Media
Host Media Externally: Embed videos from external platforms like YouTube or Vimeo instead of hosting them directly on your server, which can add a significant amount of HTML code.
Compress Images: Optimize image sizes using compression tools like TinyPNG to reduce the HTML document size related to image loading.
I hope that helps you!
Thank you!
Hello!
There should be some settings to hide it on each shortcode and also some settings in the theme panel. If not, we can write CSS code to hide it. Please let me know where exactly you need to hide it.
Thank you!
Hi,
Usually, the color and image are set on the row, so please edit with tagDiv Composer and select the row and go in the tab CSS, select the viewport for phone https://i.imgur.com/ZAs78aN.png -> https://forum.tagdiv.com/topic/background-color-of-the-main-menu-be-changed/
Thank you!
Ok, I checked on homepage, post, author and category and the menu elements seems to be moving on posts when the sticky sidebar is used. I think this is what you referred. Now this can be a result from css optimizations, what I will recommend is to check if this is happening when you are logged in, if is happening then there is a different problem, and not related to css optimizations.
Also, just for a test you can try to disable the sticky header -https://i.imgur.com/leWpFEG.png, clear cache and create a new one an see if the score is better.
Hello,
You need to adjust it as you want. Please provide some screenshots and the link to your website.
Also, you can create a module that have this function without using CSS code -> https://forum.tagdiv.com/modules-builder-newspaper-theme/
Thank you!
Hi,
I would like to take a look. Can you please email us at contact@tagdiv.com with the wp-admin access and include the link to the topic in the email?
But please let me know if you have any issues related to CSS
Thank you!
Hi,
I’m glad that there are improvements!
1) I don’t know how to solve this. How do I do it? – That one is related to some settings in wp rocket, here is a similar topic – https://forum.bricksbuilder.io/t/how-to-fix-pagespeed-issue-referenceerror/10792/2
4) I’ve changed the title from H3 to H2. I think this is what you were saying. – yes this was what I mean.
– Background and foreground colors do not have a sufficient contrast ratio. -> I see that now is only on footer there is should be better to change the email color to #ffffff if you want you can use this css that will set the hover on it:
.footer-email-wrap a{
color: #ffffff;
}
.footer-email-wrap a:hover{
color: #c8152b;
}
– Touch targets do not have sufficient size or spacing. -> please try this custom css, it should resolve a part of targets:
.meta-info,
.td-post-category {
font-size: 12px;
}
I hoe this will help!
Hello,
Please go to the tab CSS of the row and set there the height.
Thank you!
Hello, there is no error, just an css issue. when a update arrived, i don’t know why, css crashed.
Hello,
You have malware on the website. Please update to the latest version 12.6.8
If you want to update the theme, you should download the latest version of it from the Theme Forest account and download it.
I recommend that you update the theme manually https://forum.tagdiv.com/how-to-update-the-theme-2/ via FTP/cPanel/File Manager, also if possible disable extra plugins during the theme update to avoid any problems that may arise and make sure that you have activated the tagDiv Standard pack plugin to keep the website’s look. You can try to update the theme on a staging website.
After you update the theme, you need to update the theme plugins too.
In the worst cases, the settings in the theme panel may be lost (there have been isolated cases), in these cases, after the theme plugins that were previously used are activated, you will have to use a backup for the theme panel -> https://forum.tagdiv.com/import-export-theme-settings/
You could consider reinstalling the WordPress version, and checking for this plugin wp-zexit.php. It might be wise to inspect via FTP if it doesn’t appear in the WordPress -> Plugins. Additionally, using Wordfence to scan the website and remove unknown users would be prudent.
Change admin passwords and delete admin accounts you are not familiar with;
– Delete any weird/unknown plugins;
– Delete the weird/unknown themes;
– Clean unfamiliar Theme Panel injected code (example – https://i.imgur.com/4q70kCv.png);
– Clean WordPress files (example – https://i.imgur.com/stJCqiK.png)
Please block /wp-json/tdw/save_css
If an attacker wants to target this URL /wp-json/tdw/save_css they can do so. Even if the website uses a different theme, the attacker can still try that URL. We could add an option to be able to enable/disable the Live CSS, it will be considered. But for now in order to remove it this can only be done with a modification to the composer plugin. I think that all that removing it requires is to comment this line of code – https://prnt.sc/RtwvL5Nc4ikR -> https://prnt.sc/ymZmhdUfp57U But as I mentioned, the attacker can still try to access the URL.
Thank you!
Hi TheZugzwangBlog,
Ok, let’s try to resolve the problems one by one, first on homepage:
– you have some errors in console that should b resolved – https://i.imgur.com/afwoy3V.png
– the footer logo image is missing – https://i.imgur.com/i3eAHkX.png
– for “Background and foreground colors do not have a sufficient contrast ratio.” use this custom css:
.td_block_big_grid .td-big-grid-meta,
.td_module_mx1 .meta-info {
background: #111;
}
.td_module_mx1 .meta-info {
padding-top: 16px;
padding-bottom: 16px;
margin-bottom: 0;
}
– set for “Últimas entradas” a different SEO title, set it on H2 – https://i.imgur.com/gyBDQWt.jpeg
Those should improve the situation. After you implement it let me know and I will check and see what remains and provide some solution to make it better.
Thank you!
</style><div class=”td-block-title-wrap”></div><div class=”td_mod_wrap td-fix-index”><div class=”g g-2″><div class=”g-col b-2 a-6″>
<style scoped>
/* custom css – generated by TagDiv Composer */
i get 2 links generated here to phishing sites
system dont allow me to post all code it blocks it.
Hello,
Please add this class to the block td-numbered-post-flex and add this code in a raw CSS https://i.imgur.com/2EpPwHa.jpeg -> https://i.imgur.com/uOHyM9l.png
.td-numbered-post-flex .td_block_inner {
counter-reset: section;
}
.td-numbered-post-flex .td_block_inner .td_module_flex_1::before {
counter-increment: section;
content: counter(section);
color: #d2dae1;
border-radius: 50%;
font-family: PT Serif, Serif;
font-size: 42px;
line-height: 1;
display: inline-flex;
position: absolute;
right: 0;
bottom: 10px;
}
@media (min-width: 768px) and (max-width: 1018px) {
.td-numbered-post-flex .td_block_inner .td_module_flex_1::before {
font-size: 30px;
}
}
Thank you!
Hello,
I recommend using a single post template -> https://forum.tagdiv.com/design-post-pages-using-cloud-library-templates/ For example, add a flex block in a post template, go to the filter tab of the element’s settings, and from the dropdown category filter, you can choose between Single – More from author, Single – Related by category, Single – Related from tags. Those special filters will work as expected https://forum.tagdiv.com/flex-block-settings-guide/
For the moment, the only solution is to use a custom css to remove the section “More From Author”:
.td_block_related_posts .td-related-right{
display: none;
}
Set the code in Theme Panel – Custom code – custom CSS.
Thank you!