>
Download This Plugin | |
Download Elegant Themes | |
Name | Custom Query Fields |
Version | 0.1.2b |
Author | Julian Lannigan |
Rating | 0 |
Last updated | 2011-05-10 06:03:00 |
Downloads |
1933
|
Download Plugins Speed Test plugin for Wordpress |
Home page PageSpeed score has been degraded by 0%, while Post page PageSpeed score has been degraded by 0%
Custom Query Fields plugin added 3 bytes of resources to the Home page and 17 bytes of resources to the sample Post page.
Custom Query Fields plugin added 0 new host(s) to the Home page and 0 new host(s) to the sample Post page.
Great! Custom Query Fields plugin ads no tables to your Wordpress blog database.THIS PLUGIN IS IN HEAVY DEVELOPMENT!
Extend your site's querying and sorting functionality using custom field values.
The following function registers queryable fields.
register_custom_queryable_field($fieldName, $options);
Simple Example:
register_custom_queryable_field('city');
(The above registers the custom field 'city' to be searchable using query variables)
http://www.yoursite.com/?city=Anahiem
(displays posts which have a meta key 'city' and a value of 'Anahiem')
Advanced Example:
register_custom_queryable_field("price", array("dataType"=>"numeric"));
(The above registers the custom field "price" to be searchable as a number using query variables)
http://www.yoursite.com/?price=500
(displays posts which have a meta key 'price' and a exact value of '500')
http://www.yoursite.com/?price_min=200&price_max=800&order_by=price
(displays posts, sorted by 'price', which have a meta key 'price' and a value between '200' and '800')
Available Options:
There is a "order_by" query var made available. This is used by adding &order_by=price
to the URL. In this instance, the query would sort based on the "price" field only.
Note: This plugin does not alter any queries when in the backend.