Thank you.
Thanks, here is what my friend ChatGPT has allowed me to go through the code and update.
Though when you run it, it gives a white screen, you need to refresh the browser or open a new one.
/**
* Update post meta data for all posts of post type "post"
* with the "td_post_theme_settings" meta key.
* Specifically, if the post has a non-empty "td_post_template" setting,
* it is updated to "tdb_template_71018".
*/
function edit_template() {
// Define arguments for WP_Query
$args = array(
'post_type' => 'post',
'posts_per_page' => -1
);
// Create a new WP_Query object with the defined arguments
$the_query = new WP_Query( $args );
// Loop through each post in the query results
while( $the_query->have_posts() ) {
// Set up the post object and make it available to functions
$the_query->the_post();
global $post;
// Get the "td_post_theme_settings" meta data for the current post
$td_post_theme_settings = get_post_meta( $post->ID, 'td_post_theme_settings', true );
// If the post has a non-empty "td_post_template" setting,
// update it to "tdb_template_71018" and save the new value
if( !empty( $td_post_theme_settings['td_post_template'] ) ) {
$td_post_theme_settings['td_post_template'] = 'tdb_template_71018';
update_post_meta( $post->ID, 'td_post_theme_settings', $td_post_theme_settings );
}
}
// Reset the query and clean up after the loop
wp_reset_query();
}
// Call the function to execute the code
edit_template();
// Use "die" to ensure that no further code is executed after the function call
die;
Thank you is it possible to protect the signup form with Captcha or Recaptcha from Google?
The problem is still there, and it is a bug.
Here is how you can recreate it on your end.
Install the mobile plugin.
Create a template for a post or any template.
On Gutenberg, disable the mobile plugin as indicated by Calin. View the page, and it will show as I described.
Unfortunately, I cannot give out the website credentials.
I have checked on an a test website and it is the same.
But I mentioned I did all these.
Thank you for this. It will work perfectly for my situation.
Regards
Hi Calin, maybe it is a coincidence.
I have placed the code back and I will monitor for a few days to determine.
All is good now.
Do we have more code snippets to optimize the mobile plugin?
Regards
Hi Calin,
I resolved the issue. The modified date is showing up on posts that have been re-indexed by Google.
But this is after I removed this code I had added to the Mobile theme functions.php
Can you confirm if the code provided by Amit has conflicts somewhere? It is the only code I had added after the update and when I removed, I noticed the date started showing after a few hrs on our high traffic posts.
-
This reply was modified 4 years by
thelastpoet.
Hi, Please check this article several like these that were modified after the latest update are not showing the date.
This one and many others that were modified before the update display the date on Google.
Thanks.
-
This reply was modified 4 years by
thelastpoet. Reason: Added more information
Hi Calin,
All I needed was to re-install tagDiv Composer and it worked.
You also made an update NEWSPAPER – VERSION: 11.3.1 which worked too.
But the current update made the modified dates not to show on Google.
We updated to the new version 2 days ago and now the date is missing on all recently updated posts on Google SERPS.
The fix in the update for modified date might have messed up something because you had fixed it before and it was working well prior to the update.
Yesterday we made updates to our posts and none shows the modified date on Google.
Kindly check
Thanks,
Is there a way we can save the code so it does not get overridden when an update is made to the theme?
Does a plugin like Code Snippets work?
When will you release the next update? Will it be this month?
Update:
I see Lucian provided a solution here https://forum.tagdiv.com/topic/post-views-meta-data/
I don’t know if it is the same since that was over seven years ago.
I am also using the Post Pay Plugin and have a problem setting the post meta.
Hi Calin, it is not about testing but just providing your end on which Post meta holds the views count since Newspaper counts visits and creates a field on the posts page where we see visits.
By providing this info, the Postpay Plugin will use that post meta and use NewsPaper visits.
IanGJ why are you commenting if you have no idea? Again you have a very small website, which might not seem like a big deal to you.
My site gets thousands of visitors a day, and I had trusted Tagdiv for the theme. I did not know they could control my website remotely. Even my web host cannot control my website without informing me.
They violated the privacy and security of my website.
In some cases, this is criminal.
After cooling down, I think the Tagdiv team should offer a public apology. You cannot do such a thing by taking over the websites of your customers remotely.
Is this included in the licence policy? I know what you wanted to achieve, but what about non-techie users who outsourced services to developers.
At first, I thought I was hacked and panicked only to realize it was your actions.
WordPress REST API was not working, and this affected other services that rely on the API.
Would you please apologize in the right way?
Reset the key and register again, then clear cache. It worked for me. But this is a grave mistake. I know many people don’t check their websites regularly, which will go on for hours or days.
Hello,
Thanks, Looks good now.
Hi,
Thanks for adding the Modified date on the mobile theme. However, after adding it, Google does not show any dates from our articles on SERPS.
The website is a big one and indexes immediately.
This might be the way the modified date is added to the Mobile theme. It is just a plain date and very different from how it is implemented on the Desktop version.
See the difference in the attached pictures.
As you can see here: https://developers.google.com/search/docs/advanced/appearance/publication-dates
Google recommends we “Make your dates and times consistent.”
This is not consistent in our case where the Desktop and Mobile version differs.
Attached Pictures:
https://ibb.co/Y0nGXtB
https://ibb.co/D8hpyvv
Thank you.
It is crucial since Google uses mobile to index articles. Having the mobile plugin without this feature is useless even if we enable it on Tagdiv Composer.
Too bad, why do you think they won’t implement it?
If you use a mobile theme and set a modified date on the Desktop, the modified date won’t show on mobile, and Google won’t pick it up.
Google uses the mobile version to index pages. If you want the modified date picked up by Google, disable the mobile plugin and use the mobile page, which has the setting from tag div composer.
If you only use the mobile theme for AMP and set the modified date on the Desktop, it will show on Google since Google will use the responsive version on mobile to update the SERPs.
I requested the modified date feature be added to the mobile theme some months back; maybe they will add it in the coming updates.
Ok.
Can I use this plugin https://wordpress.org/plugins/wp-last-modified-info/ ?
Do you have users who are using it?
Thanks
Hello,
I have updated to Newspaper 11 but this requested feature is not yet available. I don’t know why you think it is not important in a Google mobile-first world.