- NewspaperWP Rocket and Newspaper Theme: Optimization Guide
- TutorialsFrom WPBakery to tagDiv Composer
- TutorialsOffset Feature
- TutorialsWhat is Ajax preloading?
Because the Home page is becoming more & more slow and it’s showing continuously updating but ultimately not updating. Please give me a quick solution as soon as possible.
Hello,
I have two problems that are related.
The first is that by following Youzify tutorial to include a profile section, the link goes to the wrong URL.
For example for the profile this refers to: website.com/membres/johnprofile/edit/group/1/
The second problem is going to the correct URL: website.com/membres/john
When I want to go to options. Example for change avatar. This returns a bad URL: website.com/membres/johnprofile/change-avatar
In fact, the links redirect all to the wrong URL.
For the any options this refers to website.com/membres/johnprofile/edit/group/1
There is always this “profile/edit/group/1” or “profile/edit/xx” bit that is added.
I don’t know why. Could you help me, please ?
Hello,
We have made a page that works well enough, Tendences.lv We use the WPRocket cache plugin, the loading speed is normal on desktop. We now want to adjust various things for the mobile version, as well to improve the appearance and speed of the mobile version.
Questions:
1. How to correctly install tagDiv Mobile Theme plugin so that the mobile version after instalation displays the page as it is displayed right now, so that existing users can use it. After the mobile version can be slowly changed in design.
2. Are plugins Official AMP for WP compatible with WP Rocket, and please tell me best way how to introduce it in our page.
Please send me a good example of a Newspaper page showcase using tagDiv Mobile Theme and Official AMP for WP, so I can have a look and test the speeds and how the designs have been changed for the Desktop and Mobile versions.
Thank you
Hello Megan!
I did an example for you with image caption and text on this post, please check: https://rareparenting.com/gift-guide-for-kids-with-disabilities-holiday-2023/
Thank you!
Hi Bettina,
Just to follow up, I found the below code and added it to the functions.php file, and captions now work, for future reference for anyone else! 🙂
To find the functions.php file:
Go to Appearance -> Theme file editor -> functions.php appears on the right.
Instructions:
Copy and past the below at the bottom of the code.
//filter Media & Text block output to add image caption
function media_block_caption( $block_content, $block ) {
if ( $block[‘blockName’] === ‘core/media-text’ ) {
$mediaId = $block[‘attrs’][‘mediaId’];
if($mediaId){
$image = get_post($mediaId);
$image_caption = $image->post_excerpt;
if($image_caption){
$content = str_replace(‘</figure>’, ‘<figcaption>’ . $image_caption . ‘</figcaption></figure>’, $block_content);
return $content;
}
}
}
return $block_content;
}
add_filter( ‘render_block’, ‘media_block_caption’, 10, 2 );
Good morning, you don’t understand me…. the example I posted above shows that it doesn’t let me edit the region where the author data is appearing
I’ve already tried editing the footer, editing the single post but it won’t let me edit the region where the author’s data is displayed, which is sometimes above the last block of the single post and the time on the page’s footer.
I’m sending two examples, it won’t let me change the region
the third print is an example of where the code would be
1 – 
2 – 
3 – 
Hi bettina,
In the video you can see I created captions for both the featured image and the image & text block. Only the featured image caption displays. The image & text block does not show captions, across the whole website.
https://www.loom.com/share/e39a500da26a401f894b8ec8b774d4b4?sid=d4f54530-97f8-4234-8b0c-73becd46bb28
Thanks,
Megan
Hi Bettina,
Yes I know that. The captions work fine on all images across the site (images in posts as well as featured images), EXCEPT for the media & text blocks. Captions have been inserted, correctly, on some of those images in the link I included in this post, yet they do not display. Please let me know.
Thanks.
Hello @tghidotti !
This is the sample post title. Please edit an article with the tagdiv composer.
The content can be modified in Gutenberg.
Thank you!
Good evening, as you can see in the print, when editing the single post cloud example, it doesn’t let me select the block right in the footer
I believe it is an error, as it is between the end of the single post blocks and the footer

Hi Bettina,
I referred to the media & text blocks, not the featured image. I have captions for some of the images in the post, and they aren’t displaying.
Thanks!
Hi
want to tahnk you for 24/48, its work now nut remember there is 2 other questions in the same email
but now
can you tell me how to unmute video
check the link here https://www.bgospel.com/palmyre-seraphin-se-sou-li-mwen-kampe-video/
when page open, video start but stay on MUTE,
how to unmute them?
thank you
When editing text as the example in a post, with 2 columns, Cannot change the interline space that I use.
I have a specific problem with the my account page, as it loads in a strange and different way, for example from the my subscriptions page, and it still shows a 500 error on the page, could anyone help me? Have you ever seen anything like this?
The error happens only the tab Dashboard. The tab Account Details is working.
Account Details working: https://www.printfriendly.com/pdf-viewer/default-4e26271a6d00cd8d0c374cc078800b0c.png?ids%5B%5D=default-4e26271a6d00cd8d0c374cc078800b0c.png
Hi All,
Captions work fine when I’m using an image block. But if I insert a “Media & Text” block (image and text), the captions don’t show. Please let me know?
Example post of media & text blocks, without captions showing: https://rareparenting.com/gift-guide-for-kids-with-disabilities-holiday-2023/
Thanks!
I had similar problem with my website with this popular posts. I solved it in a way that I made custom shortcode for sorting based on total number of views (not in last 7 days or 48h). In shortcode you have the option to choose how old you want your posts to be. hat means that it wont show posts older than 7 days (or any other number of days defined in shortcode) even though if they are visited.
Here is my codes which works for me in my Newspaper child theme. Use it freely if it suits you and your website.
Code in functions.php file in child theme:
// Include the popular posts shortcode file
include_once get_stylesheet_directory() . '/sedamdana-popular-shortcode.php';
File in child theme whic I named “sedamdana-popular-shortcode.php”
(this forum is not allowing me to share code from my php file, so I uploaded it on link: https://file.io/PSWL4VdNb7xN)
The shortcode output is styled using CSS defined in the PHP code. You can further customize the styles by modifying the CSS within the bhcrow_posts_shortcode_styles function.
Once the PHP code is added, you can use the [bhcrow_posts] shortcode in your posts, pages, or widgets where you want to display the list of posts.
Example usage: [bhcrow_posts title=”Popular Posts” number=3 days=30 category=”technology” sort=”visits” show_date=false]
Customize the shortcode attributes as per your requirements. For example, you can change the number of posts displayed, the sorting criteria, or whether to show thumbnails or dates.
The shortcode [bhcrow_posts] can accept several attributes to customize its behavior. Here are the available attributes and their default values:
title (default: ‘Posts’): The title of the section.
number (default: 5): The number of posts to display.
days (default: 7): Number of days to consider for displaying posts.
category (default: none): The category of posts to display.
show_thumbnails (default: true): Whether to show post thumbnails.
show_date (default: true): Whether to show post dates.
show_visits (default: true): Whether to show visit counts.
show_category (default: true): Whether to show post categories.
show_title (default: true): Whether to show post titles.
sort (default: ‘visits’): Sorting criteria for posts (‘visits’ for popularity, ‘latest’ for latest posts).
title_limit (default: none): Character limit for post titles.
cache_duration (default: 60): Cache duration in minutes.
The final output is cached using set_transient to improve performance by avoiding repeated database queries.
After adding the shortcode to a post or page, view the page on your website to see the output. The posts should be displayed based on the attributes you’ve specified in the shortcode.
Remember to backup your files before making any changes, especially when editing theme files or using any PHP code.
I use it without any issues on my website Visoko.co.ba news portal
Here is the screenshot of it. I use it with minimum options on my homepage.
-
This reply was modified 2 years by
bhcrow.
Once I have edit text on the wordpress editor, the underline space didnt reflect on live site
For example https://chefstv.net/muffin-de-chocolate/ you will see the mess text that not reflect what I save on wordpress editor
I cant send to screenshot
Hi, any chance to have the option to filter posts in a block by custom fields (especially date custom field)?
I added to standard posts a date custom field and I would need to filter the posts in the blocks by this field.
Example: I would need to filter all the posts that have the Date Custom Field set to current and future dates.
Example on the home page, it shows you this:
“J&#039 ;en ai”
And on the article page it shows you this:
“J&rsquo ;en ai”
-
This reply was modified 2 years by
max-4.
After upgrading to Newspaper ver. 12.6.3, when accessing my website, the following error displayed:
Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/sesawi/public_html/wp-content/plugins/td-mobile-plugin/Mobile_Detect.php on line 1257
Apart from that, I got similar issue when enabling the “Official AMP for WP” plugin.
Please kindly help?
Let’s see the case more closely as popular posts is vital nowadays
I have all below set:
– option in theme panel to show views on post
– 24h/48h post views sorting
– ajax view count
– single post views inside template for single post
I made a post today:
From google analytics i see it has about 1600 views
From special post fields:
post_views_count has 1660 and it is correct
post_views_last_24_hours, post_views_last_48_hours and post_views_count_7_day_total show all 77 views, the fact that all 3 have the same number is correct as post is from today but why are so different and wrong comparing to post_views_count ?
All these 4 fields obviously should show the same number as post is today’s, right?
post_views_count_7_day_last_date has 1703030789, is it a timestamp or something?
Thanks!
Right but how to import Website tamplate its also not working …
Hello Betty!
You can only modify the footer with TagDiv Composer if you go to a page where it is assigned and edit that page with TagDiv Composer, and then you will have access to the footer also. For example, edit your homepage with TagDiv Composer, scroll till footer, click on footer zone and you can edit it.
We have 3 options for mobile versions that you can use:
1. Responsive version: A responsive version of your website looks similar to the desktop version. TagDiv Composer is used to edit the page.Click on the mobile viewport: https://www.screencast.com/t/XDQJedlggSB. There, you can see your mobile version and edit or adjust the elements to look better.
2. Mobile pages: https://tagdiv.com/newspaper-10-3-7-update-brings-customizable-and-fast-mobile-pages
3. Mobile theme plugin: The Mobile Theme is a performance-optimized theme included in the main Newspaper theme that only loads on mobile devices. It comes with its own templates and designs for pages, posts, categories, etc., so your current templates from the desktop theme will get converted to the mobile theme layout. Please see https://forum.tagdiv.com/the-mobile-theme/ and https://forum.tagdiv.com/mobile-theme-introduction/ for more information.
A full explanation is here: https://www.youtube.com/watch?v=SpGkOnJeNZY
If you need to use mobile version 1 or 2, then you need to uninstall the Mobile Theme plugin and AMP.
Thank you!
Hi,
Have you tried blocking them with wordfence? Something like this would work – https://prnt.sc/1V-dHi7xTQXk But it may take some time until all the URLs are blocked, as they keep changing most likely. Eventually they will all be blocked however and the attack will stop.
I think it could be done from cloudflare as well, if you use cloudflare. That URL can be blocked like this for example – https://community.cloudflare.com/t/possible-to-block-specific-page-access/106765/3 In case you are using cloudflare, this would be a very good solution because cloudflare will block them before they reach the website. But in case it isn’t possible to set up cloudflare, the wordfence method will work as well. Please try it as soon as possible.
Thank you!