Archived topic
Move entry-meta on archive/single blog with icons and change date format
5 replies · Started by Joynal Abdin on May 1, 2020
Hello! I've used the following code:
add_filter( 'generate_header_entry_meta_items', function() {
return array(
'date',
'author',
'categories',
);
} );
to make the meta appear above the blog post.
First problem I encountered is: it's not actually moving it from the bottom part, it's just adding it. Can I unhook the bottom part? Or Do I need a CSS display none?
Question two: When I get the things I want above the post, the icons aren't following. How would I fix that?
Question three: Can I change the post-date from (2020-05-01) to 1 MAY?
Preferably on the archive page I would like:
Featured image
Category
Title
On the single i want
Author | Date | Comments | Category
Title
content
tags
Hope that makes sense! :)
Hi there,
You can remove the categories from the footer like this:
add_filter( 'generate_footer_entry_meta_items', function( $items ) {
return array_diff( $items, [ 'categories' ] );
} );
The date and author don't have icons by default, so I'm not sure how that would look? Do you have icons to add to them?
You can change the date format in "Settings > General".
Hope this helps :)
Thank you! No sorry, the date and author don't but for example the category have. And using the function in the initial post I made, it brings it up but without the icon. Do I need to CSS it there or is there a way when putting in on top of the title, to actually show the icon as well? The other icons I will add manually with CSS.
Another thing I noticed, in the WooCommerce single product: If you add a image to the bottom in the short description, with a align on it, the "add to cart" button becomes misplaced. Just a heads up if it's possible to fix: https://youtu.be/8h0TX9rPNl4
Does this do the trick?:
.entry-header .cat-links:before {
display: inline-block;
}
Any chance you can open a new topic regarding the WooCommerce issue?
Thanks!
Thanks! That did it.
You're welcome :)