- This topic has 8 replies, 2 voices, and was last updated 3 years, 10 months ago by David.
-
AuthorPosts
-
June 15, 2020 at 2:45 am #1328204Rick
Hi there,
I would like the Meta description on my posts to be a little different from what it is:
right now the first post shows:| 11th June 2020 by Rick de Groot
11th June 2020 | by Rick de Groot | Formulas
Which is basically:
Date | “By” & First Name Author |CategoryIs that possible with the theme?
Regards,
RIckJune 15, 2020 at 3:37 am #1328272DavidStaffCustomer SupportHi there,
you can use the
generate_header_entry_meta_items
filter:https://docs.generatepress.com/article/generate_header_entry_meta_items/
June 15, 2020 at 4:58 am #1328388RickHi there,
That is an interesting article David. Some things I noticed still though.
– I was able to add a category, but it only shows up in the posts, not on the front page.
– Also the formatting just looks a little off. I tried searching the internet for a bit before returning to you. I’m trying to add a separator between each of the items. I’d like one of those pipe symbols “|” to create something like this:11th June 2020 | by Rick de Groot | Formulas
Maybe this is done in CSS or PHP after all?
Best regards,
RickJune 15, 2020 at 5:04 am #1328390DavidStaffCustomer SupportLets fix the missing Category first – are you using any other functions that change post meta ? Dates names etc….
June 15, 2020 at 5:26 am #1328412RickI don’t think so. The only PHP I added is the one we’re talking about now, together with the Google Fonts. For the current theme I did import the layout from one of GeneratePress’ provided bloglayouts. I don’t see anything specific to change Meta data though. I looked in the Additional CSS and PHP snippets plugin.
Also I use this CSS to change the font size:
.entry-meta { font-size: 80%; }
And the PHP snippet:
add_filter( 'generate_header_entry_meta_items', function() { return array( 'date', 'author', 'categories', ); } );
June 15, 2020 at 6:50 am #1328536RickI was able to add the categories in the front page as well in the customizer. It seems to be an option at:
Layout – blog – Content.
I added the author there. The only thing left to do still is to see if I can separate the items with a pipe symbol. CSS maybe?
June 15, 2020 at 6:52 am #1328539DavidStaffCustomer SupportTry this CSS:
.entry-meta span:not(:last-child):after { content: '|'; margin: 0 5px; color: #aaa; }
June 15, 2020 at 7:10 am #1328553RickYou did it again David. Do they also call you magician around the office? 😉
I’m really enjoying the time since I bought GeneratePress. I knew nothing about HTML, or CSS, but with some tips from friends I’ve been able to make quite some adjustments already. It’s almost completely to my liking now. And your help here is highly appreciated. I just wanted to put that out there.
Thanks again,
RickJune 15, 2020 at 8:32 am #1328797DavidStaffCustomer SupportI get called quite a few things …. lol
You’re very welcome. Glad we can be of help. And thanks for the feedback we really appreciate it.
-
AuthorPosts
- You must be logged in to reply to this topic.