Title: All Post Type Ajax Search
Author: Daniel Esparza
Published: <strong>16 septembre 2025</strong>
Last modified: 5 novembre 2026

---

Recherche d’extensions

![](https://ps.w.org/all-post-type-ajax-search/assets/banner-772x250.png?rev=3362197)

![](https://ps.w.org/all-post-type-ajax-search/assets/icon.svg?rev=3362197)

# All Post Type Ajax Search

 Par [Daniel Esparza](https://profiles.wordpress.org/desparza/)

[Télécharger](https://downloads.wordpress.org/plugin/all-post-type-ajax-search.1.1.0.zip)

 * [Détails](https://fr.wordpress.org/plugins/all-post-type-ajax-search/#description)
 * [Avis](https://fr.wordpress.org/plugins/all-post-type-ajax-search/#reviews)
 *  [Installation](https://fr.wordpress.org/plugins/all-post-type-ajax-search/#installation)
 * [Développement](https://fr.wordpress.org/plugins/all-post-type-ajax-search/#developers)

 [Support](https://wordpress.org/support/plugin/all-post-type-ajax-search/)

## Description

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).

## Captures d’écrans

[⌊Settings: choose the post types and the default image.⌉⌊Settings: choose the post
types and the default image.⌉[

Settings: choose the post types and the default image.

[⌊Front end: search box and results list (thumbnail, title, type).⌉⌊Front end: search
box and results list (thumbnail, title, type).⌉[

Front end: search box and results list (thumbnail, title, type).

[⌊Example of the shortcode inside a page.⌉⌊Example of the shortcode inside a page
.⌉[

Example of the shortcode inside a page.

[[

[[

[[

## Installation

 1. Upload the `all-post-type-ajax-search` folder to `/wp-content/plugins/`.
 2. Activate the plugin through the **Plugins** menu in WordPress.
 3. Go to **CP Ajax Search** in the admin menu and select the post types to include.
 4. Add the shortcode `[all-post-type-ajax-search]` wherever you want the search box.

## FAQ

### Which post types appear in the settings list?

Only relevant types: posts, pages, products and other custom post types that are
public or have an admin UI. Technical types (attachment, revision, nav_menu_item,
shop_order, product_variation, etc.) are hidden automatically.

### Can I change the maximum number of results?

The limit is 5 results. It cannot be changed from the settings screen in this version.

### How is the default image set?

In the plugin settings (CP Ajax Search) there is a field for the default image URL.
Leave it empty to use the image included in the plugin.

### Is it compatible with WooCommerce?

Yes. If the product post type is registered (WooCommerce), it appears in the list
and can be included in the search.

### Is it translation ready?

Yes. All strings use the internationalization functions and the text domain all-
post-type-ajax-search.

## Avis

Il n’y a aucun avis pour cette extension.

## Contributeurs/contributrices & développeurs/développeuses

« All Post Type Ajax Search » est un logiciel libre. Les personnes suivantes ont
contribué à cette extension.

Contributeurs

 *   [ Daniel Esparza ](https://profiles.wordpress.org/desparza/)

[Traduisez « All Post Type Ajax Search » dans votre langue.](https://translate.wordpress.org/projects/wp-plugins/all-post-type-ajax-search)

### Le développement vous intéresse ?

[Parcourir le code](https://plugins.trac.wordpress.org/browser/all-post-type-ajax-search/),
consulter le [SVN dépôt](https://plugins.svn.wordpress.org/all-post-type-ajax-search/),
ou s’inscrire au [journal de développement](https://plugins.trac.wordpress.org/log/all-post-type-ajax-search/)
par [RSS](https://plugins.trac.wordpress.org/log/all-post-type-ajax-search/?limit=100&mode=stop_on_copy&format=rss).

## Journal des modifications

#### 1.1.0

 * Interface strings in English, ready for translation on translate.wordpress.org.
 * Front-end JavaScript messages are now translatable.
 * CSS and JS now load only on pages that contain the shortcode.
 * Fixed: removed the request to a non-existent admin script.
 * Readme: removed the mention of a filter that does not exist.
 * Plugin header: added Requires at least, Requires PHP and License URI.

#### 1.0.0

 * Initial release.
 * Shortcode [all-post-type-ajax-search].
 * Settings screen: post types selection and default image URL.
 * Real-time AJAX search with a result limit and distribution by post type.
 * Secure implementation (nonces, sanitization, escaping) and optimized queries (
   no_found_rows).

## Méta

 *  Version **1.1.0**
 *  Dernière mise à jour **il y a 2 jours**
 *  Installations actives **Moins de 10**
 *  Version de WordPress ** 5.0 ou plus **
 *  Testé jusqu’à **7.1.4**
 *  Version de PHP ** 7.2 ou plus **
 *  Langue
 * [English (US)](https://wordpress.org/plugins/all-post-type-ajax-search/)
 * Étiquettes
 * [ajax](https://fr.wordpress.org/plugins/tags/ajax/)[custom post types](https://fr.wordpress.org/plugins/tags/custom-post-types/)
   [realtime](https://fr.wordpress.org/plugins/tags/realtime/)[search](https://fr.wordpress.org/plugins/tags/search/)
   [shortcode](https://fr.wordpress.org/plugins/tags/shortcode/)
 *  [Vue avancée](https://fr.wordpress.org/plugins/all-post-type-ajax-search/advanced/)

## Évaluations

Aucun avis n’a encore été envoyé.

[Votre avis](https://wordpress.org/support/plugin/all-post-type-ajax-search/reviews/#new-post)

[Tout voir](https://wordpress.org/support/plugin/all-post-type-ajax-search/reviews/)

## Contributeurs

 *   [ Daniel Esparza ](https://profiles.wordpress.org/desparza/)

## Support

Quelque chose à dire ? Besoin d’aide ?

 [Voir le forum de support](https://wordpress.org/support/plugin/all-post-type-ajax-search/)

## Faire un don

Souhaitez-vous soutenir l’avancement de cette extension ?

 [ Faire un don à cette extension ](https://buy.stripe.com/aFadR96KU6oU5Mxfw68N200)