Timeline for Is it possible to sort the post based on a custom field?
Current License: CC BY-SA 3.0
8 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
May 16, 2017 at 17:56 | comment | added | Milo |
@Max you are querying for posts with dates that match $today . You don't want to set meta_value unless you are looking for a specific value. Note that the code in the answer above does not set meta_value .
|
|
May 16, 2017 at 17:54 | comment | added | Max | Hi @punit-patel It doesn't work, check my edit | |
Apr 23, 2017 at 4:47 | comment | added | Punitkumar Patel |
Hi @Max You need to add $query->set('paged', $page) in search_filter function here you will get $page value by $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
|
|
Apr 22, 2017 at 21:50 | comment | added | Max | Thanks Punit!, With the above query does not work because the page appear 404 error when going to the second page | |
Apr 20, 2017 at 3:53 | comment | added | Punitkumar Patel | It will work by default on taxonomy-event-date.php but you need to validate for specific page taxonomy-event-date in search filter. Otherwise it will load for all pages. | |
Apr 19, 2017 at 18:15 | history | edited | jdm2112 | CC BY-SA 3.0 |
edited body
|
Apr 19, 2017 at 18:10 | comment | added | Max | This can be done in the same default main query of the template taxonomy-event-date.php ? | |
Apr 19, 2017 at 17:24 | history | answered | Punitkumar Patel | CC BY-SA 3.0 |