WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Hiding dates in posts (18 posts)

  1. robbieray
    Member
    Posted 1 year ago #

    Hi, is there a plugin or something that can hide the date a post was made? i read about something but couldnt find the code to delete in my theme , thanks

  2. Mohammed Mazhar
    Member
    Posted 1 year ago #

    Removing the date from wordpress post is very simple, all you have to do is search for these lines of code in your theme file and delete them.
    Lines to delete:

    <?php the_date(); ?>
    or this function
    <?php the_time(); ?>

    Or you can use some plugins also. You can also read the entire tutorial on this topic Remove date from WordPress posts

    Hope this solves your problem, buddy

  3. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Be sure that you are not editing theme files directly -- use a child theme so you won't lose any change when the theme is updated.

  4. robbieray
    Member
    Posted 1 year ago #

    Thanks Mazhar , will take a look hopefully i wont mess up lol

  5. robbieray
    Member
    Posted 1 year ago #

    I tried the plugin and now it states 15666 daysago posted !

  6. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    The easier way to do what you want is to use CSS "display: none;" to hide the date from displaying on the page. You need to use the class or ID for the date element as the selector for that CSS. If you post a link to your site, someone can likely be more specific. But again, make a child theme or use a custom CSS option or plug-in. Modifying theme files will create major problems for you down the road.

  7. robbieray
    Member
    Posted 1 year ago #

    Anyone able to do it for me? im lost here

  8. Hi, is there a plugin or something that can hide the date a post was made?

    WPyogi's advice is on target, you really want to do it with a child theme and preferably with CSS as that's often easiest.

    Which theme is it? If you are using one from the WordPress theme repo here then someone may be able to provide you some specific advice.

  9. robbieray
    Member
    Posted 1 year ago #

    Hi the theme is travel press ,got to be honest its above me ..im one of the saddos that uses WordPress but dont fully understand this thanks pal

  10. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Unless you post a link to your site, it's impossible to give specific help. There seem to be quite a few themes with that name. If it's a commercial theme, you'll need to get help from the vendor.

  11. robbieray
    Member
    Posted 1 year ago #

    Hi the link is http://www.whatsonbenidorm.com , i did have a plugin but the date stayed at 15666 days posted

  12. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    As noted above, you should not make any changes to theme files -- so use a custom CSS plug-in, option or a child theme. Then add this to the new CSS section/file:

    .entry-meta {
       display: none !important;
    }
  13. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Looks like your theme already has a custom.css file -- so use that.

  14. robbieray
    Member
    Posted 1 year ago #

    Hi appreciate your time on this, do i just add that code to the custom.css file? thanks again

  15. WPyogi
    Volunteer Moderator
    Posted 1 year ago #

    Yep, and then be sure to clean any browser or other caches.

  16. robbieray
    Member
    Posted 1 year ago #

    Thanks your a star !

  17. robbieray
    Member
    Posted 1 year ago #

    Worked a treat thanks

  18. robbieray
    Member
    Posted 1 year ago #

    Resolved thanks

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.