Add subtitle (extract?) to homepage posts

  • Author
    Posts
  • #124154

    Hi there,

    I was wondering whether it would be possible to add a second line underneath the title of each post, to show on the Homepage. At the moment, to do this I have to make the titles really long.

    So, for example the ideal output would be…
    Line 1: TITLE
    Line 2: Subtitle, perhaps from the Blog Extract
    Posted by
    Reading time

    This would be very useful!!

    Thanks – great theme, by the way.

    The blog I need help with is nownewnext2018.com.

    #124289

    ricardpriet
    Theme Author

    Hi there,
    thanks for writing and using Silvio :)

    yes, unfortunately there is no option to add it from the WordPress panel because for this we will need to change some php file (to call the excerpt).

    However you can get it via CSS. You can add to each post a custom subtitle. The first rule you only need to add once and is for style the text (you can customise the font-size and other things):

    .post-grid h1.entry-title:after {
        display: block;
        font-size: 20px;
        text-transform: none;
        font-weight: normal;
    }

    Then for each post you can add this CSS starting from the post ID number. For example:

    #post-225.post-grid h1.entry-title:after {
        content: "Subtitle for your post with id 225";
    }

    Here you are how to get the ID number of each post:
    https://en.support.wordpress.com/pages/#how-to-find-the-page-id

    Hope this helps :)
    Ricardo P. from SiloCreativo

The topic ‘Add subtitle (extract?) to homepage posts’ is closed to new replies.