php - Wordpress: Search items in table -
i have created test page in users can access pdf , word documents.
site: http://recordandreturn2.insctest1.com/online-forms
the default search feature on wordpress site not bring of items once have typed them in. example, search "affidavit of heirship". using plugin called easy table client need add or remove items moving forward. have searched wordpress search functionality enhancers, nothing seems work.
this example site has search feature brings forms, want achieve: http://www.judicialtitle.com/resources/forms
here plugin capable of searching shortcodes: https://wordpress.org/plugins/wp-ultimate-search/
alternatively, can add following functions.php include shortcodes in searches
<?php //replace wp_trim_excerpt commented out strip_shortcodes() function improved_trim_excerpt($text) { $raw_excerpt = $text; if ( '' == $text ) { $text = get_the_content(''); //$text = strip_shortcodes( $text ); $text = apply_filters('the_content', $text); $text = str_replace(']]>', ']]>', $text); $text = strip_tags($text); $excerpt_length = apply_filters('excerpt_length', 55); $excerpt_more = apply_filters('excerpt_more', ' ' . '[...]'); $words = preg_split("/[\n\r\t ]+/", $text, $excerpt_length + 1, preg_split_no_empty); if ( count($words) > $excerpt_length ) { array_pop($words); $text = implode(' ', $words); $text = $text . $excerpt_more; } else { $text = implode(' ', $words); } } return apply_filters('improved_trim_excerpt', $text, $raw_excerpt); } remove_filter('get_the_excerpt', 'wp_trim_excerpt'); add_filter('get_the_excerpt', 'improved_trim_excerpt'); //you might need add in order make sure //shortcodes parsed , not displayed //$text = do_shortcode($text); ?> this code http://3rdplanetwebsolutions.com/news/add-shortcode-content-to-wordpress-search-results/
Comments
Post a Comment