- This topic has 5 replies, 2 voices, and was last updated 6 years, 5 months ago by
David.
Viewing 6 posts - 1 through 6 (of 6 total)
-
AuthorPosts
-
November 24, 2019 at 11:43 pm #1075562
Willya
Hi, after updating my GP theme to 2.4, the comment count on single post meta is dissapear. Please help me.
This is my script:
add_filter( 'generate_post_author', '__return_false' ); add_filter( 'generate_show_comments', '__return_false' ); add_filter( 'generate_post_date_output', 'tu_fancy_byline' ); function tu_fancy_byline( $date ) { printf( ' <span class="byline">%1$s</span>', sprintf( '<span class="author vcard" itemtype="http://schema.org/Person" itemscope="itemscope" itemprop="author">%4$s<a href="%1$s" title="%2$s" rel="author"><span class="author-name" itemprop="name">%3$s</span></a></span>', esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ), esc_attr( sprintf( __( 'View all posts by %s', 'generatepress' ), get_the_author() ) ), esc_html( get_the_author() ), get_avatar( get_the_author_meta( 'ID' ) ) ) ); $time_string = '<time class="entry-date published" datetime="%1$s" itemprop="datePublished">%2$s</time>'; if ( get_the_time( 'U' ) !== get_the_modified_time( 'U' ) ) { $time_string = '<time class="updated" datetime="%3$s" itemprop="dateModified">%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( '<span class="posted-on">%s</span>', // WPCS: XSS ok, sanitization ok. $time_string ); if ( ! post_password_required() && ( comments_open() || get_comments_number() ) ) { echo '<span class="comments-link">'; comments_popup_link( __( 'Leave a comment', 'generatepress' ), __( '1 Comment', 'generatepress' ), __( '% Comments', 'generatepress' ) ); echo '</span>'; } }November 25, 2019 at 4:54 am #1075952David
StaffCustomer SupportHi there,
can you clear and disable the Autoptimize cache so i can take a look
November 25, 2019 at 4:56 am #1075957Willya
Hi David,
Okay, I have disable the Autoptimize plugin and clear the cache.
November 25, 2019 at 6:12 am #1076066David
StaffCustomer SupportOdd – can you try adding this CSS:
.single .comments-link { display: inline-block !important; }November 25, 2019 at 6:38 am #1076115Willya
Wow it work! Thanks for rescue me again, David.
November 25, 2019 at 6:55 am #1076360David
StaffCustomer SupportGlad to be of help
-
AuthorPosts
Viewing 6 posts - 1 through 6 (of 6 total)
- You must be logged in to reply to this topic.