Custom Query Blocks

Descripción

Un plugin para WordPress que sirve para mostrar entradas y términos (p. ej. categorías) usando un bloque de Gutenberg. Funciona bien con entradas, páginas, tipos de contenido personalizado, taxonomías y términos.

Bonus: archive mapping.

Note: (2021-07-28) The blocks are deprecated as there are better custom query items and the new Query block in WordPress 5.8. Thank you for trying us out.

  • Map your post type archives to a page for customization of the post type archive page.
  • Map your category archives to a page for customization of the term archive page.
  • Map your 404 template to a page and easily customize your 404 page.

Ver la documentación y la descripción general

El plugin actualmente tiene tres bloques:

Asignación de archivo de tipo de contenido

Este plugin te permite asignar tus páginas de archivo de tipos de contenido personalizado. Simplemente crea una página y ve a «Ajustes -> Lectura» para establecer la página para tu archivo.

Asegúrate de que tus tipos de contenido tengan establecido has_archive como «true».

  • Selecciona una página pública para usar como página de archivo del tipo de contenido.
  • Consulta el archivo y verás el contenido de la página en lugar del contenido del archivo.
  • Usa plantillas de página en tus páginas para mayor flexibilidad.
  • Bloque de Gutenberg personalizado para mostrar tus entradas.

Asignación de archivo de términos

Este plugin también te permite asignar tus archivos de términos a una página. Simplemente crea una página y ve a editar tu término para establecer la página de archivo.

  • Crea una página pública para usarla como archivo de términos.
  • Visita la página de edición de términos y selecciona la página.
  • Consulta el término y verás la página seleccionada.
  • Usa Gutenberg en tu página pública para personalizar el archivo.

Asignación de página 404

Este plugin te permite asignar una página para tu página 404, para que puedas personalizar una página 404 según la necesites.

Capturas

  • Configuración del bloque de tipos de contenido personalizados.
  • Nuevo bloque de cuadrícula de términos.
  • Ajustes -> Opciones de lectura.
  • Opción de archivo de términos.

Bloques

Este plugin proporciona 3 bloques.

  • Featured Posts by Term Highlight a term (category) and show the items within it. Perfect for term archives.
  • Term Grid Show off your terms (categories) in a beautiful and customizable grid.
  • Custom Posts Show a grid or list layout of custom post type archives that you can narrow down by post type, taxonomy, and term.

Instalación

  1. Solo descomprime y sube la carpeta «post-type-archive-mapping» a tu directorio «/wp-content/plugins/»
  2. Activa el plugin desde el menú «Plugins» de WordPress

Asignación de archivo de tipo de contenido

  1. Crea un tipo de contenido personalizado que tenga un archivo
  2. Crea una página con una plantilla personalizada. Usa el bloque de Gutenberg para mostrar entradas en ese tipo de contenido personalizado.
  3. Ve a «Ajustes -> Lectura» y asigna la página al archivo de tipo de contenido personalizado
  4. Ve al archivo del tipo de contenido y observa que el contenido de la página ahora es el archivo

Asignación de archivo de términos

  1. Crea una página pública para usarla como archivo de términos.
  2. Visita la página de edición de términos y selecciona la página.
  3. Consulta el término y verás la página seleccionada.
  4. Usa Gutenberg en tu página pública para personalizar el archivo.

404 Template Mapping

  1. Visit Settings->Reading and map your 404 template to a page.
  2. Customize the new 404 page.
  3. Navigate to a broken URL to preview the 404 page.

Preguntas frecuentes

No veo los tipos de contenido. ¿Qué sucede?

Asegúrate de que tu tipo de contenido tenga establecido has_archive y show_in_rest como «true».

¿Puedes hacer entradas en lugar de páginas?

This plugin will only allow mapping to pages.

¿Este plugin funciona con archivos de términos (por ejemplo, categorías)?

Sí. Edita un término y podrás asignarlo a cualquier página.

Necesito ayuda, ¿puedes darme una mano?

Yes, just post in the support forums here and I’ll do my best to address your issue.

Reseñas

17 de octubre de 2023
An indispensable plugin for mapping archives to pages, for when archive.php won't do the trick.
24 de junio de 2022
I don't generally use the archive mapping features, but the Post Query functionality is the best I've found. Would love for it to have a 'No posts found.' message option on the front-end, other than that it's great!
8 de mayo de 2022
Very handy in adding small blocks of posts from a taxonomy. Thanks guys 🙂
7 de mayo de 2021
I get it, it started as a custom Archive page mapping plugin. And it needed a custom query block to be useful in the block editor era. But the custom query block is useful on its own, and it's really hard to find. A so useful feature for the block editor should be top priority. Not sure how you could make it work, but both features should be detached. Thanks for sharing your work.
7 de marzo de 2021 1 respuesta
I installed this plugin to run and output custom queries with the Gutenberg block. That aspect of the plugin is beyond fantastic. However, the mapping feature doesn't make sense (to me) to include.. it seems like it ought to be its own separate plugin. On top of that, there was no way to disable the mapping functionality and it automatically broke all of my archives. Despite having all options for mapping set to 'default' my archives would either throw a 404 or return a page outputting ALL post, page and CPT content. I have no reason to create custom archives and the original reason I installed the plugin doesn't offer enough value to justify the added work of creating and mapping archive pages.
13 de febrero de 2021 1 respuesta
Very useful plugin particularly the archive page mapping feature. Really appreciate the archive mapping feature been looking for a way to do that for months. The term grid ability to draw from any and all CPT taxonomies is putsanding feature. Hopefully a few more embellishments to the grid like images will be added.
Leer todas las 25 reseñas

Colaboradores y desarrolladores

«Custom Query Blocks» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Custom Query Blocks» ha sido traducido a 4 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «Custom Query Blocks» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

5.2.0

  • Released 2024-03-17
  • Fixing a bug in the Term Grid block where the SearchListControl in Woo Components was throwing an error, so the component was reworked.

5.1.6

  • Released 2023-03-17
  • Fixing a bug where the term grid didn’t show on the frontend.

5.1.5

  • Released 2022-10-02
  • Fixing a bug where a term would not save in the custom post types block.

5.1.4

  • Released 2022-10-01
  • Updated build scripts.
  • Fixing schema errors when it comes to registering attributes.

5.1.2

  • Released 2021-07-28
  • Fixing block categories for WP 5.8.

5.1.0

  • Released 2021-03-25
  • Seeking volunteer devs if you want to learn blocks and help lower the build size.
  • Feature: Can disable post type mapping via the settings page.
  • Feature: Can disable the blocks via the settings page.
  • Feature: Can disable the columns on the pages screen.
  • Feature: Can disable the created image sizes.
  • Feature: New admin options to enable/disable settings.
  • Bug fix: Selecting individual terms in the term block would not reflect on the front-end.
  • Misc: Removing block icon from the Add Blocks screen.
  • Misc: Updating block icons and color scheme.
  • Bug fix: Tweaking word-break in the terms block.

5.0.6

  • Released 2021-03-09
  • Fixing term saving causing archives to fail.

5.0.5

  • Released 2021-02-12
  • Mapping to pages now shows a hierachy to more easily select pages.
  • New branding. Hopefully less spammy.
  • Making readme more descriptive of what the plugin does.

5.0.1

  • Released 2021-02-12
  • Fixed the Term block with the block erroring out when modifying the query parameters.
  • Testing with WordPress 5.7.

5.0.0

  • Lanzado el 7 de septiembre de 2020
  • Added ability to map 404 to a page.
  • Fixed Gutenberg bugs in the Custom Post Types block and Featured Posts block.

4.5.5

  • Lanzado el 23 de agosto de 2020
  • Minimium supported version is now WordPress 5.5
  • Fixed pagination for WP 5.5.
  • Fixed REST API errors for WP 5.5.
  • Miscellaneous block fixes and updates.

4.5.3

  • Lanzado el 17 de mayo de 2020
  • Added Polylang support when mapping posts. Added WPML support for the main Custom Post Types block.

4.5.2

  • Lanzado el 1 de mayo de 2020
  • Removing the term redirect as some pages would get «stuck.»

4.5.1

  • Lanzado el 29 de abril de 2020
  • Added pagination to the Featured Posts by Category Block.

4.5.0

  • Lanzado el 20 de abril de 2020
  • Added featured posts by category block.
  • Added block previews.
  • New plugin name: Custom Query Blocks

= 4.0.5 –
* Released 2020-04-16
* Added compatibility for Yoast SEO.

4.0.1

  • Lanzado el 12 de abril de 2020
  • New block: Term (Category) Grid Block.
  • HOT FIX: Term Grid wasn’t loading.

3.3.5

  • Lanzado el 7 de abril de 2020
  • Updated plugin architecture.
  • Show mapped pages and its own column.
  • Mapped term pages now redirect to the correct term.
  • Added new contributor: Paal Joachim.

3.3.1

  • Lanzado el 1 de abril de 2020
  • Fixing PHP notice saying invalid argument for foreach statement.

3.3.0

  • Lanzado el 11 de marzo de 2020
  • New full post mode for showing off the full post.
  • Option to remove the link from the title.

3.2.2

  • Lanzado el 10 de febrero de 2020
  • Plugin was having conflicts with other admin screens when saving terms, resulting in a 403 error.

3.2.1

  • Lanzado el 3 de febrero de 2020
  • Added support for translations.
  • Revised loading screen to make it easier on translators.

3.2.0

  • Lanzado el 3 de febrero de 2020
  • Added ability to map term archives to pages.

3.1.1

  • Lanzado el 1 de febrero de 2020
  • Added several order and orderby parameters.

3.1.0

  • Lanzado el 26 de enero de 2020
  • Removing custom field placeholder if a custom field isn’t present.
  • Removing continue reading link and post link if custom post type isn’t publicly queryable.
  • Wrapping excerpt in paragraph tag.
  • Add class to readmore paragraph tag for styling.
  • Hiding styles options if override styles is present.
  • Changing verbiage of remove styles to Override styles.
  • Añadida compatibilidad para las fuentes de Adobe a través de https://wordpress.org/plugins/custom-typekit-fonts/

3.0.9

  • Lanzado el 8 de diciembre de 2019
  • Added the ability to set a fallback image for the featured image.

3.0.7

  • Lanzado el 5 de diciembre de 2019
  • Fixing pagination when a page with the Gutenberg block is set as the front page.

3.0.6

  • Lanzado el 5 de diciembre de 2019
  • Moving featured image to its own panel in Gutenberg settings.
  • Moving title to its own panel in Gutenberg settings.
  • Cleaning up editor styles for headings.
  • Adding ability to change the heading HTML tag.

3.0.5

  • Lanzado el 5 de diciembre de 2019
  • Adding ability to remove styles so that you can style your own layout.

3.0.0

  • Lanzado el 3 de diciembre de 2019
  • Adding custom field support.
  • Updating REST API for faster loading.

2.2.2

  • Lanzado el 2 de diciembre de 2019
  • Added ability to remove title from displaying.
  • Added new branded loading animation.

2.2.1

  • Lanzado el 29 de octurbe de 2019
  • Testing up to WordPress 5.3.
  • Fixing JS error when jQuery is not defined as a $ variable.

2.2.0

  • Lanzado el 23 de agosto de 2019
  • Bug fix when in grid mode and image is placed below the title.
  • Bug fix: skipping taxonomies when there are none.
  • Bug fix: fixing capitalization error.
  • Enhancement: You can now select fonts for your content areas.

2.1.2

  • Lanzado el 11 de junio de 2019
  • Corrige la paginación

2.1.1

  • Lanzado el 26 de mayo de 2019
  • Some users were seeing featured images twice in the back-end.

2.1.0

  • Lanzado el 25 de mayo de 2019
  • Fixed Gravatar sizing not saving.
  • Changing the way excerpts are shown in Gutenberg.
  • Added the ability to change taxonomy location.
  • Content can now be centered in the Grid view.
  • Added border, padding, and background style options in Gutenberg block.
  • Added color options for text in Gutenberg block.

2.0.7

  • Lanzado el 24 de mayo de 2019
  • Added the ability to trim the excerpt length.
  • Reduce the file size of the Gutenberg block script using a new build technique.

2.0.5

  • Lanzado el 21 de abril de 2019
  • Conditional term filtering

2.0.4

  • Lanzado el 18 de abril de 2019
  • Adding support for six columns
  • Fixing undefined index error

2.0.3

  • Lanzado el 29 de marzo de 2019
  • Fixed term not being saved when displaying posts

2.0.1

  • Lanzado el 17 de enero de 2019
  • Fixed pagination when using a page with just the block

2.0.1

  • Lanzado el 17 de enero de 2019
  • Fixing bug where arguments weren’t an array when switching reading types in Settings->Reading.

2.0.0

  • Lanzado el 6 de enero de 2019
  • Numerous enhancements to the Gutenberg block including showing taxonomies, setting the image type (Avatar vs Regular), setting where the featured image is displayed, selecting the image size, and much more.

1.0.1

  • Lanzado el 7 de noviembre de 2018
  • WordPress 5.0 compatibility

1.0.0

  • Lanzado el 24 de septiembre de 2018
  • Versión inicial.