-
AuthorPosts
-
February 5, 2023 at 3:34 am #1396704
Hi,
There is not schema data in my post time, page: https://www.yundianseo.com/google-seo/I want to add modified schema data, just like this:
How should I do? Have checked posts:
https://kriesi.at/support/topic/change-blog-date-to-last-updated-instead-of-date-published/
https://kriesi.at/support/topic/blog-grid-view-not-showing-dates-or-showing-incorrect-dates/
https://kriesi.at/support/topic/change-meta-on-grid-blog-posts/Use below code, but not work
echo "<time class='date-container minor-meta updated' $markup> 更新于 " .get_the_modified_time(get_option('date_format'), $the_id) . "</time>";
February 7, 2023 at 3:54 am #1396908Hi,any method to solve it?
February 7, 2023 at 5:48 am #1396919Hi,
Thank you for the inquiry.
What kind of schema markup are you trying to add? Please provide a link to the documentation or reference so that we can check it.
Best regards,
IsmaelFebruary 7, 2023 at 6:20 am #1396925February 7, 2023 at 6:41 am #1396930Hi,
Thank you for the screenshot.
Instead of editing the template, try to add this filter in the functions.php file.
add_filter('avf_markup_helper_attributes', 'avf_markup_helper_attributes_modified', 10, 2); function avf_markup_helper_attributes_modified($attributes, $args) { global $post; if( $args['context'] == 'entry_time' ) { $attributes['datetime'] = get_the_modified_time(get_option('date_format'), $post->ID); } return $attributes; }
Best regards,
IsmaelFebruary 7, 2023 at 7:06 am #1396935Hi,
It is not work for the single image post, but change the datatime of grid post.
I only want to add it for single image posts
And I don’t want:
datetime=”更新于 2022年7月11日”
I need:
February 8, 2023 at 8:16 am #1397099Hi,
Is there any way to make it?
February 10, 2023 at 8:57 am #1397405Hi,
Sorry for the delay. We modified the code a bit and removed the string. Please try it again.
Best regards,
IsmaelFebruary 10, 2023 at 9:29 am #1397411Hi,
Which website do you mean?
The test website cheapseo.cn ?
Not see the change, there is still not datatime schema for single image posts
February 13, 2023 at 5:28 am #1397701 -
AuthorPosts
- You must be logged in to reply to this topic.