Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter xjamasterx

    (@xjamasterx)

    I just figured out how to do that.

    Is there a way to change the date format on the Manage page to Month/Day/Year instead of the default, which is Year/Month/Day?

    Plugin Author Greg Winiarski

    (@gwin)

    WPAdverts is using the WP date format set in wp-admin / Settings panel.

    Thread Starter xjamasterx

    (@xjamasterx)

    That’s not the case for us. In the back end wp-admin / Settings panel we have it set to say “March 12, 2018”.

    However, in the plugin it shows 2018/3/12.

    Plugin Author Greg Winiarski

    (@gwin)

    Add in your theme functions.php file the code below

    
    add_filter( "adverts_sh_manage_date", "my_adverts_sh_manage_date", 10, 2 );
    function my_adverts_sh_manage_date( $date, $post ) {
        $expires = get_post_meta( $post->ID, "_expiration_date", true );
        return date_i18n( __( 'm/d/Y' ), $expires );
    }
    
Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘Hide expiration date’ is closed to new replies.