- This topic has 34 replies, 2 voices, and was last updated 4 years ago by David.
-
AuthorPosts
-
March 26, 2018 at 6:01 pm #531821LeoStaffCustomer Support
One of the methods here: https://docs.generatepress.com/article/adding-php/
Code Snippets is the easiest if you aren’t using a child theme.
May 13, 2018 at 1:44 pm #574633MichaelHi, I tried this code (the first set) and it only moves the categories. Anyway to get the tags to move up under the title as well?
May 13, 2018 at 7:32 pm #574728LeoStaffCustomer SupportCan you try this set?
https://generatepress.com/forums/topic/display-post-categories-and-tags-below-title/#post-443405Let me know.
May 20, 2018 at 1:14 pm #580268MichaelHi Leo,
That worked but unfortunately it also put the tags on every single post excerpt in the Tag pages…which, besides looking goofy, is absolutely horrible for SEO. Tag pages are over optimized by nature and injecting this many more keywords is likely to attract a Google algo penalty.
See here for an example:
https://foodal.com/tag/potato/
I don’t want to see category or tag links on blog archives…and I have that turned off in customizer. It is definitely NOT good for SEO…besides the injection of kewyords, it’s diluting the link juice flow to each post. These categories and tags pages need to function as sort of container for a content cluster or silo if that makes sense. All the child pages link back to the parent and the parent links back to the child and that’s it.
May 20, 2018 at 1:29 pm #580284MichaelOk, I turned off Show Authors on Archives (which really shouldn’t have been on anway) and it did away with the category and tag showing on category and tag pages…so I guess problem solved.
May 20, 2018 at 6:26 pm #580403LeoStaffCustomer SupportGlad you figured out π
April 5, 2019 at 6:40 am #860452DamonHello there
I am also trying to get categories to show under the title (instead of at the bottom of the page).
I added this suggestion https://generatepress.com/forums/topic/display-post-categories-and-tags-below-title/#post-443405 using Code Snippets plugin. Which works fine, however the category still shows below the post.I would like to remove the ‘category’ and ‘add a comment’ link on the bottom of the excerpt on archives and remove the category from the bottom of the single post.
If any of you kind people could help me figure it out I would appreciate it.
April 5, 2019 at 6:53 am #860589DamonSOLVED: I turned off the categories in the Customizer.
Thanks for the awesome theme xx
April 5, 2019 at 6:54 am #860590DavidStaffCustomer SupportGlad to hear you got it resolved.
September 13, 2019 at 4:36 am #1008529PaulSo I tried implementing the suggestions from both Leo and Tom and neither works correctly. Leo’s doesn’t format well. Tom’s is missing the icons and also duplicates the cats and tags on the archive page. I’ve googled the forum and this topic has been asked a few times, but all authored solutions don’t have a practical answer. Here’s what people want:
Move cats and tags to the top of the post, below the title. It should look like the default version normally on the bottom with the icons. Don’t duplicate cats and tags on the archive pages.
September 13, 2019 at 9:10 am #1008807TomLead DeveloperLead DeveloperHi there,
First, add this function:
add_filter( 'generate_header_entry_meta_items', function() { return array( 'author', 'date', 'categories', 'tags', ); } ); add_filter( 'generate_footer_entry_meta_items', function( $items ) { return array_diff( $items, [ 'categories', 'tags' ] ); } );
Then, add this CSS:
.entry-header .cat-links:before, .entry-header .tags-links:before { display: inline-block; /* adds icons */ } .entry-header .cat-links, .entry-header .tags-links { display: block; /* puts them on their own lines */ }
Hope this helps π
September 13, 2019 at 9:40 am #1008832PaulIt’s beautiful work. Works great. Thank you!
I used:
add_filter( 'generate_header_entry_meta_items', function() { return array( 'categories', ); } ); add_filter( 'generate_footer_entry_meta_items', function( $items ) { return array( 'date', 'tags', 'post-navigation', ); } );
Is there any way that I can style the previous and next post on the very bottom of the post? The text is very small and faint. I wasn’t able to find the css code using chrome inspector.
September 13, 2019 at 3:26 pm #1008970TomLead DeveloperLead DeveloperYou could try this:
.post-navigation { font-size: 20px; }
Feel free to open a new topic if you need more help with that one π
September 13, 2019 at 3:32 pm #1008978PaulPerfect. I think we can officially mark this thread resolved. Thanks for your help, Tom and the GP Team.
September 13, 2019 at 3:38 pm #1008981TomLead DeveloperLead DeveloperNo problem π
-
AuthorPosts
- You must be logged in to reply to this topic.