- This topic has 7 replies, 4 voices, and was last updated 5 years, 1 month ago by Leo.
-
AuthorPosts
-
March 2, 2019 at 9:37 pm #827008Sumit
I want author gravator, no. of comments, and last updated date below my post title in the blog page.
Please check the screenshot. (I want the same thing)
Screenshot URL: https://drive.google.com/file/d/1guKIeAsJ0J8Uzvck5YDGZEYgTrd5q6dA/view?usp=sharing
please provide me custom css
March 3, 2019 at 7:51 am #827438DavidStaffCustomer SupportHi there,
the Snippet Tom provides here will do that:
https://generatepress.com/forums/topic/how-to-show-updated-posts-with-plugin/#post-827017
As a note we try to provide answers to all support tickets within 24hrs, it generally is a lot quicker then that. It may also be beneficial if you added Topic Titles that we’re relevant to the to topic, it makes it easier for us and you to find the topic help you need.
March 3, 2019 at 8:29 am #827467SumitI added those code in the custom CSS field but it was showing error.
Please tell me where to add those code.
Waiting for your reply.
March 3, 2019 at 8:36 am #827474DavidStaffCustomer SupportThe code is PHP – this article covers 2 methods of adding:
March 3, 2019 at 9:04 am #827508SumitI’ve added the PHP code but size of gravator is to big and it’s in the square shape.
I want the author gravatar size and shape (i.e. round shape) same as https://masterblogging.com/blog/
I also want to add separator “|” between name, no. of comments and last updated date. (same as above blog)
I have added this code in my site:
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' ) ) ) ); if ( ! is_single() && ! 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>'; } $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() ) ); return sprintf( '<span class="posted-on">%s</span>', // WPCS: XSS ok, sanitization ok. $time_string ); }
please give me a modified code.
I’m waiting…
March 3, 2019 at 9:36 am #827542TomLead DeveloperLead DeveloperThat exact style is explained here with PHP and CSS: https://docs.generatepress.com/article/entry-meta-style/
March 3, 2019 at 10:10 am #827580SumitThanks a lot Tom.
I’m facing these two problems.
1) In the right sidebar of my blog (https://blogginglift.com/blog/), the 1st widget background colour is orange. (all the time)
How to fix this problem.2) I’m using post excerpt option in GeneratPress theme. and with this option, I want to show a full-width featured image thumbnail in my blog section. How to do it?
Thanks in advance.
March 3, 2019 at 10:13 am #827588LeoStaffCustomer SupportPlease open a new topic(s) for the separate questions.
Thanks!
-
AuthorPosts
- You must be logged in to reply to this topic.