Title: Custom Query Fields
Author: julian1828
Published: <strong>8 de Maio, 2011</strong>
Last modified: 10 de Maio, 2011

---

Buscar plugins

Este plugin **non se actualizou en máis de 2 anos**. É posible que xa non sexa compatible
ou mantido por ninguén, ou podes ter problemas de compatibilidade cando se usa con
novas versións de WordPress.

![](https://s.w.org/plugins/geopattern-icon/custom-query-fields.svg)

# Custom Query Fields

 Por [julian1828](https://profiles.wordpress.org/julian1828/)

[Descargar](https://downloads.wordpress.org/plugin/custom-query-fields.zip)

 * [Detalles](https://gl.wordpress.org/plugins/custom-query-fields/#description)
 * [Valoracións](https://gl.wordpress.org/plugins/custom-query-fields/#reviews)
 *  [Instalación](https://gl.wordpress.org/plugins/custom-query-fields/#installation)
 * [Desenvolvemento](https://gl.wordpress.org/plugins/custom-query-fields/#developers)

 [Soporte](https://wordpress.org/support/plugin/custom-query-fields/)

## Descrición

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:

 * dataType
    - text (default)
    - numeric (receive min/max query variables, see above example)
 * order
    - If the user uses the “order_by” query variable then this option determines
      the order. Available options are “ASC” and “DESC”(default)
 * compare
    - Compare method for text types. Defaults to ‘=’. Recommend ‘LIKE’

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.

## Instalación

 1. Upload `custom-query-fields` directory to the `/wp-content/plugins/` directory
 2. Activate the plugin through the ‘Plugins’ menu in WordPress
 3. See Description on how to enable the custom variables.

## Preguntas frecuentes

  When will you have some FAQ’s?

Soon.

## Comentarios

Non hai recensións para este plugin.

## Colaboradores e desenvolvedores

“Custom Query Fields” é un software de código aberto. As seguintes persoas colaboraron
con este plugin.

Colaboradores

 *   [ julian1828 ](https://profiles.wordpress.org/julian1828/)

[Traduce “Custom Query Fields” ao teu idioma.](https://translate.wordpress.org/projects/wp-plugins/custom-query-fields)

### Interesado no desenvolvemento?

[Revisa o código](https://plugins.trac.wordpress.org/browser/custom-query-fields/),
bota unha ollada ao[repositorio SVN](https://plugins.svn.wordpress.org/custom-query-fields/),
ou subscríbete ao [log de desenvolvemento](https://plugins.trac.wordpress.org/log/custom-query-fields/)
por [RSS](https://plugins.trac.wordpress.org/log/custom-query-fields/?limit=100&mode=stop_on_copy&format=rss).

## Rexistro de cambios

#### 0.1.2b

 * Fixed some foreach bugs that threw warnings if no fields were registered.
 * The plugin is now only using one global variable.
 * Added backward compatibility with version 3.0.
 * Improved code efficiency.
 * Added enable and disable functions to allow you to apply custom field query to
   external query’s.

#### 0.1.1b

 * Added the ability to control whether the query altering function is run only 
   once.
 * Added the compare option to the registered fields. This compare is ignored for
   numeric comparisons.

#### 0.1b

 * Initial build.

## Meta

 *  Versión **0.1.2b**
 *  Última actualización **Fai 15 anos**
 *  Instalacións activas **10+**
 *  Versión de WordPress ** 3.0 ou superior **
 *  Probado ata **3.1.4**
 *  Idioma
 * [English (US)](https://wordpress.org/plugins/custom-query-fields/)
 * Etiquetas
 * [custom fields](https://gl.wordpress.org/plugins/tags/custom-fields/)[meta_query](https://gl.wordpress.org/plugins/tags/meta_query/)
   [query](https://gl.wordpress.org/plugins/tags/query/)
 *  [Vista avanzada](https://gl.wordpress.org/plugins/custom-query-fields/advanced/)

## Valoracións

Aínda non se enviaron valoracións.

[Your review](https://wordpress.org/support/plugin/custom-query-fields/reviews/#new-post)

[Ver todas as valoracións](https://wordpress.org/support/plugin/custom-query-fields/reviews/)

## Colaboradores

 *   [ julian1828 ](https://profiles.wordpress.org/julian1828/)

## Soporte

Tes algo que dicir? Necesitas axuda?

 [Ver o foro de soporte](https://wordpress.org/support/plugin/custom-query-fields/)

## Doar

Queres apoiar o progreso deste plugin?

 [ Dona a este plugin ](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=9BBXFXSUG2D6U)