• Hi,

    I want to split the post-byline into 2 lines. Like in first line I want the autor and in second line I want the date publish. Please tell me how can I acheive this. It is bit urgent.

    Thank you.

    Regards,
    Paresh Mithra

    The page I need help with: [log in to see the link]

Viewing 9 replies - 1 through 9 (of 9 total)
  • Theme Author Ben Sibley

    (@bensibley)

    Hi Paresh,

    Thanks for using Mission News!

    Please try this CSS to limit the width of the byline so it splits into two rows:

    .post-byline {
      width: 160px;
    }

    You can copy and paste that code into the Additional CSS section in the Live Customizer (Appearance > Customize), and it will take effect right away.

    Thread Starter pareshmithra

    (@pareshmithra)

    Thank you for your reply. But I don’t want “on” in that byline.
    Now it shows,
    By Author Name
    on October 9, 2020

    Theme Author Ben Sibley

    (@bensibley)

    I’m afraid there isn’t a way to selectively remove words from within the byline. It can be split into multiple lines with CSS, or the date could be removed via this setting Customizer as an alternative: https://screenshot.competethemes.com/04uOY84z

    Thread Starter pareshmithra

    (@pareshmithra)

    Can’t we achieve that in function.php or any other page?

    Theme Author Ben Sibley

    (@bensibley)

    If you create a child theme, you can copy the ct_mission_news_post_byline function into your child theme’s functions.php file and then make changes to the byline there. This would also give you the option of splitting the author and date into separate HTML elements instead of using width to place them on separate lines in addition to customizing the full text.

    • This reply was modified 4 years, 1 month ago by Ben Sibley.
    Thread Starter pareshmithra

    (@pareshmithra)

    Can’t I do it in main theme’s function.php?

    Theme Author Ben Sibley

    (@bensibley)

    You can but every time a WordPress theme is updated, the new files override the old files which will cause your changes to functions.php to be erased.

    Here is a link to a starter child theme for Mission News you can use: download child theme

    Thread Starter pareshmithra

    (@pareshmithra)

    Can you please help to do that in main function.php file

    Theme Author Ben Sibley

    (@bensibley)

    If you download the starter child theme, you can copy and paste the ct_mission_news_post_byline function from the functions.php file in Mission News into the functions.php file in the child theme. Then you can edit it however you’d like.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Splitting the post-byline into two line’ is closed to new replies.