Ajax Search Pro Documentation
Get Ajax Search Pro!Get SupportKnowledge BaseDevelopment
  • Ajax Search Pro Documentation
  • GDPR and Cookie policy
  • Video Guides
  • Plugin Updates
    • Automatic Updates
      • Activation on Development and Staging environments
      • Managing purchase codes
      • Purchase Code (license key)
    • Manual Updates
    • Safe Update Guide
    • Plugin update issues or errors
    • Disabling update check
  • Installation instructions
    • Uninstallation & Reset
  • Getting started
    • Importing from the Lite version
    • Editor Blocks
    • Search Shortcodes
    • Search Widget
    • Gutenberg and Other Page Editors
    • Replacing the default theme search bar
    • Placing the search shortcode in theme files
    • Search as menu item
    • Custom result box position
    • Custom filters box position
    • Shortcode generator
  • Search Sources
    • Search Engine
    • Post, Page, Product and other Post Type Search
    • Searching Titles, Content, Excerpt
    • Search in custom fields
      • Search By Product SKU
    • Search by categories, tags or other terms
    • Search in Attachments
      • Mime types table
    • Search in File contents (pdf, word, excel etc..)
    • Search in Users
      • User meta fields
    • Limits (number of results)
    • Categories and terms as results
    • Image options
    • Result ordering
    • Peepso Groups & Group activities search
    • Grouping title duplicates
  • Behavior
    • Return/Enter key and Magnifier icon click actions
    • Search logic (primary and secondary)
      • Exact Matches vs Fuzzy Matches
      • Search logics explained
    • Live search triggering events
    • Results page override
    • Results, Archive Page and Shop Live Search and Filter
  • Elementor Integration
    • Elementor Pro Posts Widget Live Filter
    • Elementor Loop Grid Integration
    • Elementor Pro Product Widget Live Filter
    • Custom results page with Elementor Pro
    • Elementor custom search page archive override and live filter
  • Other Integration
    • Jet Engine Listing Grid Integration
  • Multisite Settings
  • Frontend Search Settings & Search Filters
    • Settings layout, position and visibility
    • Generic Selectors
    • Content Type filters
    • Date filters
    • Category and Taxponomy term filters
    • Post type Filters
    • Custom field filters - selectors
    • Search button
    • Reset button
  • Layout Settings
    • Result Layout Types
    • Results information box
    • Results position & snap
    • Content, author, date and description in results
    • More results loader and infinite scroll feature
    • Results behavior
    • Results text keyword highlighter
    • Compact search box layout
    • Auto Populate - Automatic search results on initial page load
  • Autocomplete and Keyword suggestions
    • Autocomplete
    • Results and Keyword suggestions
    • "Try these" - suggested phrases
  • Theme Options - Visual changes to the search bar
    • Theme chooser
    • Preview
    • Search box and input field layout
    • Settings and Magnifier icon
    • Settings dropdown
    • Typography
  • Index Table
    • Generating the index table
    • Enabling index table engine
    • File Content Search Addon
    • Index table FAQ
    • Synonyms
  • Relevance Options
  • Advanced Options and Uses
    • Using the Results shortcode as a custom results page
    • Shortcodes in results content
    • HTML tags in results
    • Primary and Secondary title and description fields
    • Advanced title and Content fields
      • User Search - Advanced Title and Content fields
    • Excluding & Including results
      • Exclude by category or terms
      • Exclude or Include by authors (users)
      • Exclude or Include by date
      • Exclude by Item or ID
      • Include by ID
      • Include by categories or terms (restrict to category)
      • Exclude or Include by custom field values
    • Grouping results
    • Keyword Exception & Exclusions
  • Result priority settings
    • Individual Priorities
    • Priorities by Rules (priority groups)
  • Performance Tuning
    • Fine tuning the search configuration
    • Cache
    • Visual performance
    • Ajax performance tracker
  • Compatibility Settings
    • Javascript Compatibility
  • Google Analytics Integration (GA4)
    • Tracking with Google Site Tag (gtag.js)
    • Tracking with Google Tag Manager
    • Site Search Tracking
  • Troubleshooting
    • Styling issues
    • The response data is missing from the ajax request error message
  • Translating components
    • Translating with WPML
    • Translating with Polylang
  • Pre-Purchase FAQ
  • Plugin API
    • Actions list and usage
    • Filters list and usage
    • asp_query_args filter
    • Theme functions
    • Front-end filters API
    • Javascript API
  • Other Useful Things
    • Additional search keywords for post types
    • Negative keywords
    • Meta box on post editor screen
Powered by GitBook
On this page
  • Conditional Brackets
  • Using Shortcodes in Advanced Title or Content Fields
  1. Advanced Options and Uses

Advanced title and Content fields

Adding custom fields, taxonomy terms, WooCommerce add to cart, star rating, price to the results.

PreviousPrimary and Secondary title and description fieldsNextUser Search - Advanced Title and Content fields

Last updated 2 months ago

Advanced title and content fields editor is used to add various fields, such as custom field values, taxonomy terms list, WooCommerce Add To cart, Price, Star rating and many different result fields.

The advanced field editors can be found under the Advanced Options -> Content & Fields panel.

Most of these use cases are explained in detail in the video above. For special cases not covered in the video, please read below.

Conditional Brackets

The square brackets aka [ and ] represent a conditional wrapper. Whatever is wrapped within these brackets is considered conditional, meaning:

  • If any of the field values is empty, everything within the conditional is returned as empty

  • You can use any number of fields in the conditionals

  • You can use any text or HTML within the conditionals

Practical example

Say you have a field name "text_field", which may not be assigned to all of the results. You want to display the field value such as:

My field: {field value here}

The issue is, that when a result has no "text_field", the following text will be displayed:

My field:

By using conditionals, you can wrap the field and the preceeding text with the conditional, to avoid printing the "My field:" text when the "text_field" is empty.

Using Shortcodes in Advanced Title or Content Fields

Because the square brackets are used for conditional brackets, using shortcodes is possible via double square brackets.

To use a shortcode [my_shortcode] in the field, the brackets have to be doubled so it becomes [[my_shortcode]]

Using my_shortcode in a paragraph block

<p>[[my_shortcode]]</p>

Using a shortcode with an opening and closing tag

[[shortcode_with_closing_tag]]Shortcode Content[[/shortcode_with_closing_tag]]

Using nested shortcodes within a div element

<div>
[[nested_shortcodes]]
    [[single_shortcode]]
[[/nested_shortcodes]]
</div>

Shortcodes should not be used within . The shortcode contents are executed after the conditional brackets are evaluated, therefore they don't have any effect on the conditionals.

conditional brackets
Inserting my_rfield
Adding the "My field:" text and the conditional wrappers