- This topic has 9 replies, 3 voices, and was last updated 7 years ago by Tom.
-
AuthorPosts
-
April 12, 2017 at 4:34 pm #305224david
hello! i just bought this premium features and on my way to customize.
i am asking for displaying date to visitor but not google here
with code you give, here’s my date displayed,
before
afteri want to keep before for visitor information. how can i do that?
April 12, 2017 at 7:19 pm #305259TomLead DeveloperLead DeveloperHi David,
I believe I answered your question here: https://wordpress.org/support/topic/remove-date-from-serp-2/#post-9021426
Let me know π
April 12, 2017 at 7:39 pm #305266davidyes tom, but after i implement your code the after works, i still want the before work (posted on and update on displayed)
April 12, 2017 at 8:45 pm #305276TomLead DeveloperLead DeveloperAh, try this:
add_filter( 'generate_post_date_output','tu_remove_date_microdata' ); function tu_remove_date_microdata() { $time_string = '<time class="entry-date published">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string .= '<time class="updated">%4$s</time>'; } $time_string = sprintf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date() ), esc_attr( get_the_modified_date( 'c' ) ), esc_html( get_the_modified_date() ) ); printf( '<a href="%1$s" title="%2$s" rel="bookmark">%3$s</a>', esc_url( get_permalink() ), esc_attr( get_the_time() ), $time_string ); }
April 12, 2017 at 11:11 pm #305298davidi merge the codes you gave to me before and it works. thank you.
April 13, 2017 at 10:37 am #305517TomLead DeveloperLead DeveloperYou’re welcome π
April 23, 2017 at 2:06 pm #309401TomHello Tom,
Google Searchconsole is telling me, that all my pages related to pictures and from my implemented glossar plug does not show microformat updated. error: “following missing: updated”
Number is increasing and is starting since I am using your theme.Examples are this page
https://www.ledclusive.de/blog/lighting-passport-von-asensetek-im-test/china-led-spectrometer-lighting-passport-spektrum/Any idea, what I can do?
April 23, 2017 at 7:32 pm #309464TomLead DeveloperLead DeveloperHave you turned off the post date/author in the Blog settings?: https://docs.generatepress.com/article/blog-overview/
April 24, 2017 at 12:29 am #309518TomHello Tom,
yes, all items are switched on.
Must say, that at normal posts it works. only the posts created by the glossary plugin and picture pages as individuell link does not work.April 24, 2017 at 9:59 am #309689TomLead DeveloperLead DeveloperAh yes, the standard author/date is only added to the “post” post type. Any chance you can create a new topic on this as it’s a different issue? I’ll be able to help with some code π
-
AuthorPosts
- You must be logged in to reply to this topic.