All Post Type Ajax Search

plugin banner

Buscador AJAX en tiempo real. Selecciona desde el admin qué tipos de contenido (post types) aparecen. Shortcode: [all-post-type-ajax-search]

Author:Daniel Esparza (profile at wordpress.org)
WordPress version required:5.0
WordPress version tested:7.1.5
Plugin version:1.1.0
Added to WordPress repository:16-09-2025
Last updated:05-11-2026
Rating, %:0
Rated by:0
Plugin URI:https://d3veloper.es/all-post-type-ajax-searc...
Total downloads:664
plugin download
Click to start download

All Post Type Ajax Search adds a lightweight, secure search box that returns results in real time (AJAX). From the settings screen you choose exactly which content types (posts, pages, products and other custom post types) are included in the search. Each result shows a thumbnail (or a default image), the title and a link.

Main advantages:

  • Fast front-end search with up to 5 results and a minimum of 3 characters.
  • Full control from the admin: choose the post types that appear in the results.
  • Smart filtering that hides technical types (attachments, revisions, orders, variations, etc.).
  • Built following WordPress security best practices: nonces, sanitization and escaping.
  • Simple procedural code, easy to customize for developers of any level.
  • Translation ready (text domain: all-post-type-ajax-search).

Features

  1. Simple shortcode: [all-post-type-ajax-search].
  2. Admin settings: choose the enabled post types and set a default image (URL).
  3. Each result shows a thumbnail (or the default image), the title and a link.
  4. Results are spread across post types so posts or pages are not always shown first.
  5. Default limit of 5 results; searching starts at 3 characters.
  6. Performance: no_found_rows in queries, limited posts per query, and CSS/JS loaded only on pages that contain the shortcode.
  7. Security: nonces for AJAX and settings; capability checks (manage_options) in the admin.

Video

Additional Notes for Developers

  • Stored options:
    • aptas_search_post_types (array): enabled post types.
    • aptas_default_image_url (string): default image URL.
  • Nonces:
    • AJAX: aptas_search_nonce
    • Admin: aptas_settings_save (field name aptas_settings_nonce)
  • Shortcode: [all-post-type-ajax-search]
  • AJAX action: aptas_ajax_search (wp_ajax_aptas_ajax_search / wp_ajax_nopriv_aptas_ajax_search).

Screenshots
FAQ
ChangeLog