Converting a checkbox filter for custom fields to a dropdown
Converting a checkbox filter for custom fields to a dropdown
Converting a checkbox filter for custom fields to a dropdown
You should import the schools as a table in the database, separate from the other WordPress tables. You can than write a function that selects and returns schools and eventually link it to the field via ajax using something like select2 or jquery autocomplete.
How to stop wp_query searching pages as well as the specified CPT
You can use this format of meta_query, although you’d have to change the format of all of your existing expiry-date entries. ‘meta_query’ => array( ‘key’ => ‘expiry-date’, ‘value’ => array($today, $UserInputExpiry), ‘compare’ => ‘BETWEEN’, ‘type’ => ‘DATE’ ) The second date in the array is the later date and both $today and $UserInputExpiry should be … Read more
Found the problem – i was using array, when i just needed to use such arguments: $args = array( ‘post_type’=> ‘post’, ‘paged’ => $paged, ‘posts_per_page’ => 9, ‘meta_key’ => ‘summary’, ‘meta_value’ => $thesearch, ‘meta_compare’ => ‘LIKE’ ); Thanks for help guys.
How to get past and upcoming post by defining date in custom field?
You can register a new widget in your functions file. Best to create a child theme for code additions and modifications. You can call the new sidebar in your single.php or content.php file (recommended for themes without custom hooks) Or Use a custom function with the is_singular(‘post’) conditional tag in your functions file and return … Read more
The way to go would be to create an archive template for your taxonomy. Then you can catch the term requested with a function like get_queried_object(). So now you can do a custom WP_Query querying for both your term and your meta ‘featured’ Hope that makes sense http://codex.wordpress.org/Class_Reference/WP_Query http://codex.wordpress.org/Template_Hierarchy#Custom_Taxonomies_display
A single field would be enough but if you manage your way with 3 that’s good as well. I would do a loop through the results and end up with a structure like the following: $years = array( ‘2015’ => array( <WP_Post object>, <WP_Post object>, etc… ), ‘2016’ => array( etc… ) ); Then you … Read more
Try this plugin https://wordpress.org/plugins/anthologize/ Didnt use it myself but time ago I created something similar but using pages and then using a plugin to reorder them then you can create links in the sidebar to simulate an index.. very raw.. but works