• Plans & Pricing
  • Log in
  • Get started
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress 
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Get started
  • Sign up
  • Log in
About
  • Plans & Pricing
Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Newsletter
  • Professional Email
  • Website Design Services
  • Commerce
  • WordPress Studio
  • Enterprise WordPress  
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • Support Center
  • WordPress News
  • Business Name Generator
  • Logo Maker
  • Discover New Posts
  • Popular Tags
  • Blog Search
Jetpack App
  • Learn more
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Search
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
Forums / Add recent post heading and remove date from posts

Add recent post heading and remove date from posts

  • Unknown's avatar
    hohcatholic · Member · May 15, 2016 at 6:04 pm
    • Copy link Copy link
    • Add topic to favorites Add topic to favorites

    Greetings,

    I am looking to add a heading entitled “Recent Posts” centered over the recent posts on the main page. I would also like to hide the dates of the posts. Just wondering what the CSS is to do this?

    Thank you.

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar
    dianakcury · Member · May 16, 2016 at 12:59 am
    • Copy link Copy link

    Hello!

    In order to add a heading over the recent posts on main page, please add the following into your stylesheet:

    .home .main #main-content:before {
        content: 'Recent Posts';
        font-size: 2em;
        font-weight: bold;
        text-align: center;
        display: inherit;
        margin: 0 0 20px 0;
    }

    To hide the post dates, please add:

    .home .text-on, .home .entry-date { display:none }

    The code above will hide “on date etc” only on homepage, if you like to hide on all pages just remove .home.

    Hope I have helped you :)

  • Unknown's avatar
    hohcatholic · Member · May 16, 2016 at 1:12 am
    • Copy link Copy link

    This did not work. I tried it at the beginning and the end of my stylesheet and it still did not work.

  • Unknown's avatar
    thesacredpath · Member · May 16, 2016 at 8:20 pm
    • Copy link Copy link

    Hi there, first off, this last rule in your CSS has syntax errors and is causing some issues. Basically anything after that will not be rendered because of the previous syntax error. Remove and/or edit this and fix the syntax issues.

    body > div.container.hfeed > div.main > div.col-sidebar.sidebar-small {
    	display: no body > div.container.hfeed > div.col-sidebar.sidebar-main {;
    	display: none;
    }

    To add “Recent Posts” above the posts on the main page, add the following CSS.

    .home .main-post-list:before {
        display: block;
        content: "Recent Posts";
        font-size: 2em;
        font-weight: bold;
        text-align: center;
        margin: 0 0 20px 0;
    }

    I tested the code @dianakcury gave for hiding the post dates, and it works.

  • Unknown's avatar
    hohcatholic · Member · May 16, 2016 at 8:47 pm
    • Copy link Copy link

    Yes that helped me! Also one more thing – how do I remove the “By (Author name)” on the post display?

  • Unknown's avatar
    thesacredpath · Member · May 17, 2016 at 4:22 am
    • Copy link Copy link

    Replace this

    .home .text-on, .home .entry-date {
    display:none;
    }

    with this

    .postmetadata {
        display: none;
    }
  • Unknown's avatar
    hohcatholic · Member · May 17, 2016 at 4:29 am
    • Copy link Copy link

    When I do that, it removes my social icons and date/time in the header.

  • Unknown's avatar
    thesacredpath · Member · May 17, 2016 at 6:59 am
    • Copy link Copy link

    Oh, sorry for not noticing that. They used the same CSS class for the date and social icons in the header area. Change it to this instead.

    .home .main .postmetadata {
        display: none;
    }
  • Unknown's avatar
    thesacredpath · Member · May 17, 2016 at 7:01 am
    • Copy link Copy link

    And actually, if you also wish to have that gone on the single post pages, use this instead.

    .main .postmetadata {
        display: none;
    }
  • Unknown's avatar
    hohcatholic · Member · May 17, 2016 at 7:11 am
    • Copy link Copy link

    This works!

    One last item – on the bottom of the posts it has the previous post and the next post links. How do I prevent those from showing as well?

  • Unknown's avatar
    hohcatholic · Member · May 17, 2016 at 7:13 am
    • Copy link Copy link

    And to remove the “categories” and “tagged as” text as well.

  • Unknown's avatar
    thesacredpath · Member · May 17, 2016 at 10:12 am
    • Copy link Copy link

    To remove the categories and tags from the single post pages, use this.

    single .taxonomies {
        display: none;
    }
  • Unknown's avatar
    hohcatholic · Member · May 17, 2016 at 4:06 pm
    • Copy link Copy link

    Awesome! Thank you. It is much appreciated!

  • Unknown's avatar
    thesacredpath · Member · May 17, 2016 at 6:59 pm
    • Copy link Copy link

    You are welcome!

  • The topic ‘Add recent post heading and remove date from posts’ is closed to new replies.

Tags

  • hide date
  • logo
  • recent posts

About this topic

  • In: CSS Customization
  • 3 participants
  • 13 replies
  • Last activity 10 years
  • Latest reply from hohcatholic

Couldn't find what you needed?

Contact us

Contact us

Get answers from our AI assistant, with access to 24/7 expert human support on paid plans.

Browse our guides

Browse our guides

Find step-by-step solutions to common questions in our comprehensive guides.

WordPress.com

Products
  • WordPress Hosting
  • WordPress for Agencies
  • Become an Affiliate
  • Domain Names
  • AI Website Builder
  • Website Builder
  • Create a Blog
  • Professional Email
  • Website Design Services
  • WordPress Studio
  • Enterprise WordPress
Features
  • Overview
  • WordPress Themes
  • WordPress Plugins
  • WordPress Patterns
  • Google Apps
Resources
  • WordPress.com Blog
  • Business Name Generator
  • Logo Maker
  • WordPress.com Reader
  • Accessibility
  • Remove Subscriptions
Help
  • Support Center
  • Guides
  • Courses
  • Forums
  • Contact
  • Developer Resources
Company
  • About
  • Press
  • Terms of Service
  • Privacy Policy
  • Do Not Sell or Share My Personal Information
  • Privacy Notice for California Users
DeutschEspañolFrançaisBahasa IndonesiaItalianoNederlandsPortuguês do BrasilSvenskaTürkçeРусскийالعربيةעִבְרִית日本語한국어简体中文繁體中文English

Mobile Apps

  • Download on the App Store
  • Get it on Google Play

Social Media

  • WordPress.com on Facebook
  • WordPress.com on X (Twitter)
  • WordPress.com on Instagram
  • WordPress.com on YouTube

Automattic

Automattic
Work With Us
  • Privacy
    • WordPress.com Forums
    • Sign up
    • Log in
    • Copy shortlink
    • Report this content
    • Manage subscriptions