uiXpress
Global Search

Command Syntax

Complete reference guide for global search command syntax and filtering.

Overview

Global Search supports command prefixes to filter results by content type. This allows users to quickly narrow their search to specific content types without navigating through multiple pages.

Command Prefixes

Post Filter

Syntax: >post [query]

Description:

  • Filters search results to posts only
  • Removes >post prefix from search query
  • Searches post titles and content
  • Shows only post results

Examples:

  • >post - Shows all posts (no query)
  • >post tutorial - Searches posts for "tutorial"
  • >post my article - Searches posts for "my article"

Use Cases:

  • Finding specific posts
  • Searching post content
  • Filtering to posts only
  • Quick post access

Page Filter

Syntax: >page [query]

Description:

  • Filters search results to pages only
  • Removes >page prefix from search query
  • Searches page titles and content
  • Shows only page results

Examples:

  • >page - Shows all pages (no query)
  • >page about - Searches pages for "about"
  • >page contact - Searches pages for "contact"

Use Cases:

  • Finding specific pages
  • Searching page content
  • Filtering to pages only
  • Quick page access

User Filter

Syntax: @user [query]

Description:

  • Filters search results to users only
  • Removes @user prefix from search query
  • Searches user names and email addresses
  • Shows only user results

Examples:

  • @user - Shows all users (no query)
  • @user john - Searches users for "john"
  • @user admin - Searches users for "admin"

Use Cases:

  • Finding specific users
  • Searching user information
  • Filtering to users only
  • Quick user access

Permissions:

  • Requires manage_options capability
  • Hidden if user lacks permissions
  • Admin-only feature

Category Filter

Syntax: #category [query]

Description:

  • Filters search results to categories only
  • Removes #category prefix from search query
  • Searches category names
  • Shows only category results

Examples:

  • #category - Shows all categories (no query)
  • #category news - Searches categories for "news"
  • #category blog - Searches categories for "blog"

Use Cases:

  • Finding specific categories
  • Searching category names
  • Filtering to categories only
  • Quick category access

Quick Actions Filter

Syntax: !action [query]

Description:

  • Shows only quick actions
  • Hides search results
  • Filters actions by name
  • Action-focused view

Examples:

  • !action - Shows all quick actions
  • !action post - Filters actions for "post"
  • !action new - Filters actions for "new"

Use Cases:

  • Finding quick actions
  • Filtering actions
  • Quick action access
  • Action discovery

Help Command

Syntax: ?help

Description:

  • Shows command syntax help
  • Displays all available commands
  • Command reference guide
  • Learning tool

Examples:

  • ?help - Shows help documentation

Use Cases:

  • Learning commands
  • Command reference
  • Help documentation
  • Syntax guide

Custom Post Types

Dynamic Support

Syntax: >[custom-type] [query]

Description:

  • Supports any custom post type
  • Automatically detected from REST API
  • Uses post type REST base
  • Flexible filtering

Examples:

  • >product widgets - Searches products
  • >event conference - Searches events
  • >portfolio design - Searches portfolio items

Configuration:

  • Uses search_post_types setting
  • REST API endpoints
  • Automatic detection
  • Configurable

Custom Type Detection

How It Works:

  1. Checks configured post types
  2. Matches REST base
  3. Uses endpoint for search
  4. Returns filtered results

Requirements:

  • Post type must have REST API
  • Must be in search_post_types
  • REST base configured
  • Searchable endpoint

Command Parsing

Parsing Logic

Process:

  1. Trim query whitespace
  2. Check for command prefix
  3. Extract filter type
  4. Remove prefix from query
  5. Search filtered type only

Prefix Matching:

  • Case-insensitive
  • Exact prefix match
  • Removed from query
  • Filter applied

Clean Query

What It Is:

  • Query after prefix removal
  • Actual search term
  • Used for searching
  • Content searched

Example:

  • Input: >post tutorial
  • Clean Query: tutorial
  • Filter: post
  • Searches posts for "tutorial"

Command Examples

Basic Usage

Search Posts:

>post
>post tutorial
>post my article

Search Pages:

>page
>page about
>page contact us

Search Users:

@user
@user john
@user [email protected]

Search Categories:

#category
#category news
#category blog posts

Advanced Usage

Combined with Query:

  • >post wordpress - Posts containing "wordpress"
  • @user smith - Users with "smith" in name/email
  • #category tech - Categories with "tech" in name

Quick Actions:

  • !action - All quick actions
  • !action new - Actions with "new" in name
  • !action post - Actions related to posts

Help:

  • ?help - Command syntax help

Command Reference

Quick Reference Table

CommandFilterExampleDescription
>postPosts>post tutorialSearch posts only
>pagePages>page aboutSearch pages only
@userUsers@user johnSearch users only
#categoryCategories#category newsSearch categories only
!actionQuick Actions!action newShow quick actions
?helpHelp?helpShow command help
>[type]Custom Type>product widgetSearch custom post type

Best Practices

Using Commands

When to Use:

  • Searching specific content types
  • Narrowing search results
  • Quick filtering
  • Efficient searching

Tips:

  • Use prefixes for focused searches
  • Combine with search terms
  • Learn common commands
  • Use help for reference

Command Efficiency

Benefits:

  • Faster searching
  • Focused results
  • Less scrolling
  • Better UX

Examples:

  • >post vs searching all content
  • @user john vs browsing users
  • !action vs finding actions manually

Troubleshooting

Common Issues

Command Not Working:

  • Check prefix spelling
  • Verify case (case-insensitive)
  • Ensure space after prefix
  • Check command syntax

No Results:

  • Verify content exists
  • Check permissions
  • Try without prefix
  • Use help command

Custom Type Not Found:

  • Verify REST API enabled
  • Check post type configuration
  • Verify REST base
  • Check search_post_types setting

Solutions

Verify Syntax:

  • Use ?help command
  • Check command reference
  • Verify prefix spelling
  • Test with simple query

Check Permissions:

  • User filter requires admin
  • Verify user capabilities
  • Check content visibility
  • Test with different user