Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author shivaji

    (@shivaji)

    If I got you correctly, then here is your solution:

    1. Fist open the file “post_retrive_ajax.php“ from the plugin folder a-to-z-category-listing.
    2. Go to line number 86. Here you will find a line like:

    $psql = ” select * from “.$table_prefix.”posts wpp,”.$table_prefix.”term_relationships wpr where wpr.term_taxonomy_id = ‘$ttid’ and wpr.object_id = wpp.ID and wpp.post_status = ‘publish’ and wpp.post_type = ‘post’”

    3. Now add the following code to the end of the line.

    order by wpp.post_date DESC

    That means the line will be :

    $psql = "select * from ".$table_prefix."posts wpp,".$table_prefix."term_relationships wpr where wpr.term_taxonomy_id = '$ttid' and wpr.object_id = wpp.ID and wpp.post_status = 'publish' and wpp.post_type = 'post' order by wpp.post_date DESC";

    Do the Same for the line 147:

    Add the following code to the end of the line(no. 147).

    order by wpp.post_date DESC

    That means the line will be:

    $psql = "select ID,post_title from ".$table_prefix."posts wpp,".$table_prefix."term_relationships wpr where wpr.term_taxonomy_id = '$ttid' and wpr.object_id = wpp.ID and wpp.post_status = 'publish' and wpp.post_type = 'post' order by wpp.post_date DESC";

    Thread Starter John316

    (@john316)

    Thank you very much.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: A to Z Category Listing] Sort Order – Newest Posts First’ is closed to new replies.