WordPress.org

Ready to get started?Download WordPress

Forums

List post by Custom Date Meta (5 posts)

  1. dustykhan
    Member
    Posted 1 year ago #

    I have a custom post date I adapted from this Tutorial

    The problem I have is that When listing by date it only takes into consideration the month and not the year so something posted in January 2014 will come before March 2013.

    This is the Code I use to get the post content

    Another issue Is that if the field is left empty when I add in 'meta_key' => 'fund_dead', it wont show up at all, just the fields with a date selected.

    anybody have an Idea How to fix this?

  2. IMICreation
    Member
    Posted 1 year ago #

    You have to enter date in mm/dd/yyyy format and after that you have to run query with meta key value and order by date

  3. dustykhan
    Member
    Posted 1 year ago #

    How do I enter the date in mm/dd/yyyy?

    I think I have the query running correctly, but they dont display in the correct date order. You can see the page HERE

  4. IMICreation
    Member
    Posted 1 year ago #

    you have to get date in seconds
    than compare that date with today's date

  5. dustykhan
    Member
    Posted 1 year ago #

    I dont understand, would you mind posting an example please?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.