[Resolved] change meta description

Home Forums Support [Resolved] change meta description

Home Forums Support change meta description

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1328204
    Rick

    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 |Category

    Is that possible with the theme?

    Regards,
    RIck

    #1328272
    David
    Staff
    Customer Support

    Hi there,

    you can use the generate_header_entry_meta_items filter:

    https://docs.generatepress.com/article/generate_header_entry_meta_items/

    #1328388
    Rick

    Hi 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,
    Rick

    #1328390
    David
    Staff
    Customer Support

    Lets fix the missing Category first – are you using any other functions that change post meta ? Dates names etc….

    #1328412
    Rick

    I 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',
        );
    } );
    #1328536
    Rick

    I 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?

    #1328539
    David
    Staff
    Customer Support

    Try this CSS:

    .entry-meta span:not(:last-child):after {
        content: '|';
        margin: 0 5px;
        color: #aaa;
    }
    #1328553
    Rick

    You 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,
    Rick

    #1328797
    David
    Staff
    Customer Support

    I 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.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.