Click Here to view my website.

If you will try the search bar, it will not display most of the text inside the page.
Its because most of the text inside the page are generated by "shortcodes".

How do I fix this one?

Pls help...

Dani AI

Generated

Short answer: the text produced by shortcodes is rendered at page display time, not stored as plain text in the database fields WordPress searches. That explains why s search misses most of the content and why pointed toward a “search everything” approach. Two practical, reliable options follow.

Use a better indexer (recommended)

  • Install a search plugin that indexes rendered output (examples: Relevanssi, SearchWP). These let you add the shortcode output into the index instead of relying on raw post_content.
  • With Relevanssi you can append the rendered shortcode text during indexing. Put this in a site plugin or theme functions.php and then rebuild the Relevanssi index:
function my_relevanssi_index_shortcodes( $content, $post ) {
    if ( ! is_object( $post ) ) {
        return $content;
    }
    $rendered = wp_strip_all_tags( do_shortcode( $post->post_content ) );
    return $content . ' ' . $rendered;
}
add_filter( 'relevanssi_content_to_index', 'my_relevanssi_index_shortcodes', 10, 2 );

Persist rendered text at save (alternative)

  • On save, render shortcodes and store a plain-text copy in postmeta or excerpt. This makes the text available to indexers or custom search SQL without rendering on each search:
function save_rendered_content_for_search( $post_id, $post, $update ) {
    if ( defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) return;
    if ( wp_is_post_revision( $post_id ) ) return;
    $rendered = wp_strip_all_tags( do_shortcode( $post->post_content ) );
    update_post_meta( $post_id, '_rendered_search_content', $rendered );
}
add_action( 'save_post', 'save_rendered_content_for_search', 10, 3 );

Notes and cautions

  • Rebuild your search index after adding code or switching plugins.
  • Avoid running expensive external calls during indexing/save; cache results when possible.
  • Storing rendered text duplicates data—monitor DB size and sanitize with wp_strip_all_tags.
  • See the WordPress Shortcode API and plugin docs for Relevanssi/SearchWP for further tuning: Shortcode API and Relevanssi.

fast answer:

No fast solution, installa a sarch everything plugin, and complete each post/page with "real data" using excerpts, custom fields, etc...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.