- This topic has 55 replies, 4 voices, and was last updated 4 years, 7 months ago by Tom.
-
AuthorPosts
-
July 2, 2019 at 4:19 am #946824Ravi Dixit
How to show Icons before date and comment post meta as shown in this post https://postimg.cc/4YnkBTdY
And also before Primary Menus.
July 2, 2019 at 8:29 am #947109LeoStaffCustomer SupportHi there,
You would use the :before method like this:
.posted-on:before { content: "icon"; } .comments-link:before { content: "icon"; } .main-navigation .main-nav ul li a:before { content: "icon"; }
Adding CSS: https://docs.generatepress.com/article/adding-css/
July 19, 2019 at 1:06 pm #962222Ravi DixitHello, Leo!
The CSS you have given is not working.
What do I need to add for icon…
1. <i class=”fas fa-clock”></i>
2. fas fa-clock
3. Upload and add it’s linksI have tried all 3 ways but still, none of any is working.
And I don’t want to add an icon before all menus of primary navigation instead I need to add before some specific.
July 19, 2019 at 4:02 pm #962300LeoStaffCustomer SupportCan you try this first?
.posted-on:before { font-family: 'Font Awesome\ 5 Free'; content: "\f274"; color: #333; padding-right: 5px; }
Reference: https://stackoverflow.com/questions/17254339/font-awesome-unicode
You will need to make sure FA5 is installed as well.
July 21, 2019 at 1:11 pm #963622Ravi DixitI am not able to apply this, can you please make it a bit easy?
I want to show icon before Updated date and Comments and also some before specific menus.
July 21, 2019 at 1:25 pm #963635LeoStaffCustomer SupportThis is as easy as it can be.
I’m not seeing my CSS added above in your site?
July 22, 2019 at 10:21 am #964359Ravi DixitI have added your CSS and it’s working also, Thanks for this.
There is something I want to change:
1. Icons are black and white, can I add colorful icons?
2. There is not space between icon and date(https://prnt.sc/oik1z4), Updated text and icon(https://prnt.sc/oik27i).
3. Icons are not showing for WP Show posts. here you can see: https://prnt.sc/oik2fnAnd share the CSS for Comments and navigation menus, for some specific instead for all menus.
Please help with these small issues…
Thanks
July 22, 2019 at 2:44 pm #964523LeoStaffCustomer Support1 & 2. Edited the CSS above:
https://generatepress.com/forums/topic/how-to-show-icons-before-date-and-comments-post-meta/#post-9623003. Can you guide me to a page that’s using WP Show Posts?
As for menu items, the icons can go directly into the menu label:
https://docs.generatepress.com/article/adding-icons-to-menu-items/July 22, 2019 at 4:20 pm #964550Ravi Dixit1 & 2: working good, thanks
3: Here is the link of my blog section: https://www.staymeonline.com/wp-adminAnd I can’t see any option to show comments count on Single Post, How can I do that?
July 22, 2019 at 6:11 pm #964610TomLead DeveloperLead DeveloperDo you want the comments count after the author?
Let me know 🙂
July 22, 2019 at 7:01 pm #964632Ravi DixitYes, But it would be better if you I can show that after the Updated date?
July 23, 2019 at 9:17 am #965214TomLead DeveloperLead DeveloperGive this a shot:
add_filter( 'generate_post_date_output', function( $output ) { echo $output; 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>'; } } );
July 23, 2019 at 10:19 am #965263Ravi DixitCan you guide me on how to add this?
July 23, 2019 at 1:35 pm #965381LeoStaffCustomer SupportJuly 23, 2019 at 6:20 pm #965526Ravi DixitBut the icon for comments is still not working:
I am using this CSS:
.comments-link:before { font-family: 'Font Awesome\ 5 Free'; content: "\f274"; color: #333; padding-right: 5px; }
-
AuthorPosts
- You must be logged in to reply to this topic.