[Resolved] Customising Blog Post Layout

Home Forums Support [Resolved] Customising Blog Post Layout

Home Forums Support Customising Blog Post Layout

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1080557
    Korii

    Hi there,

    How can I go about customising the layout of a blog post so that at the end of the blog post I have a line and underneath that line, I display the publication date (similar to what you see on Seth Godin’s website: https://seths.blog) – see below screenshot:

    Screenshot of blog post example

    #1080593
    Leo
    Staff
    Customer Support

    Hi there,

    Try this CSS:

    .blog .post, archive .post {
        border-bottom: 1px solid #000;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know if this helps πŸ™‚

    #1080594
    Korii

    Awesome, thanks Leo. πŸ™‚

    And then how would I go about displaying the blog post date under that line? At the moment the date is displayed at the beginning of the post after the blog title.

    #1080674
    Leo
    Staff
    Customer Support

    Sorry I missed that part of the requirement completely…

    We will need to go with another method.

    Add this PHP snippet:

    add_filter( 'generate_footer_entry_meta_items', function() {
        return array(
            'date',
            'post-navigation',
        );
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Then this CSS:

    .blog .post .entry-content, .archive .post .entry-content {
        border-bottom: 1px solid #000;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #1082034
    Korii

    Excellent, that did the job! Thanks so much for your help. πŸ™‚

    #1082167
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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