Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

order by date wp php

$query = new WP_Query(array(
    'post_status' => 'publish',
    'orderby' => 'publish_date',
    'order' => 'DESC'
  ));
//DESC sorts by newest, ASC by oldest. GL fellow grepper user
 
PREVIOUS NEXT
Tagged: #order #date #wp #php
ADD COMMENT
Topic
Name
3+1 =