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

---

Search plugins

![](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

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

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

 * [Details](https://twd.wordpress.org/plugins/all-post-type-ajax-search/#description)
 * [Reviews](https://twd.wordpress.org/plugins/all-post-type-ajax-search/#reviews)
 *  [Installation](https://twd.wordpress.org/plugins/all-post-type-ajax-search/#installation)
 * [Development](https://twd.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).

## Screenshots

[⌊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.

## Reviews

There are no reviews for this plugin.

## Contributors & Developers

“All Post Type Ajax Search” is open source software. The following people have contributed
to this plugin.

Contributors

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

[Translate “All Post Type Ajax Search” into your language.](https://translate.wordpress.org/projects/wp-plugins/all-post-type-ajax-search)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/all-post-type-ajax-search/),
check out the [SVN repository](https://plugins.svn.wordpress.org/all-post-type-ajax-search/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/all-post-type-ajax-search/)
by [RSS](https://plugins.trac.wordpress.org/log/all-post-type-ajax-search/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

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

## Meta

 *  Version **1.1.0**
 *  Last updated **2 weeks ago**
 *  Active installations **Fewer than 10**
 *  WordPress version ** 5.0 or higher **
 *  Tested up to **7.1.5**
 *  PHP version ** 7.2 or higher **
 *  Language
 * [English (US)](https://wordpress.org/plugins/all-post-type-ajax-search/)
 * Tags
 * [ajax](https://twd.wordpress.org/plugins/tags/ajax/)[custom post types](https://twd.wordpress.org/plugins/tags/custom-post-types/)
   [realtime](https://twd.wordpress.org/plugins/tags/realtime/)[search](https://twd.wordpress.org/plugins/tags/search/)
   [shortcode](https://twd.wordpress.org/plugins/tags/shortcode/)
 *  [Advanced View](https://twd.wordpress.org/plugins/all-post-type-ajax-search/advanced/)

## Ratings

No reviews have been submitted yet.

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

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

## Contributors

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

## Support

Got something to say? Need help?

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

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](https://buy.stripe.com/aFadR96KU6oU5Mxfw68N200)