• Resolved blcsue

    (@blcsue)


    Is it possible to show the expiry date of the advert and not the published date. thanks

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    where do you want to show the expiration date on the [adverts_list] or on the Ad details pages?

    Both are possible but also both require a different approach to do that.

    Thread Starter blcsue

    (@blcsue)

    on the [adverts_list]

    Plugin Author Greg Winiarski

    (@gwin)

    On the [adverts_list] the only way to do that is to open a file wpadverts/templates/list-item.php and replace the code

    
    <?php echo date_i18n( get_option( 'date_format' ), get_post_time( 'U', false, get_the_ID() ) ) ?>
    

    with

    
    <?php echo date_i18n( get_option( 'date_format' ), get_post_meta( get_the_ID(), '_expiration_date', true ) ) ?>
    

    Note the changes in list-item.php file will be overwritten on WPAdverts update, in order to avoid that you should create a child template file for list-item.php as explained here https://wpadverts.com/documentation/child-themes-and-templates/

    Thread Starter blcsue

    (@blcsue)

    ok thanks ~i will look into it

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘expiry date’ is closed to new replies.