WordPress.org

Ready to get started?Download WordPress

Forums

Vortex
Remove time from entry-meta (5 posts)

  1. ArwenUndomiel
    Member
    Posted 1 year ago #

    Is there a way to remove the time and leave only the date?

    Thank you very much!

  2. paulwpxp
    Font hero
    Posted 1 year ago #

    If not already yet, create a child theme
    http://codex.wordpress.org/Child_Themes

    Make sure you got your childtheme activated, and running properly.

    In functions.php of your child theme, put this

    add_action( 'loop_start', 'mytheme_remove_meta' );
    
    function mytheme_remove_meta() {
    	if ( is_single() )
    		add_filter('get_the_time', '__return_false');
    }
  3. ArwenUndomiel
    Member
    Posted 1 year ago #

    I put it but nothing happened, the time part is still there... :/

  4. paulwpxp
    Font hero
    Posted 1 year ago #

    I got this running in my local dev and it works for me.

  5. Helena
    Member
    Posted 10 months ago #

    I found a way to get rid of the date using the dashboard --> general settings.

    Just select "custom" time format, but leave the box blank. This did the trick for me.

    Good luck!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.