search form display no result

Try below code in your footer.php : <div id=”cd-search” class=”cd-search”> <form role=”search” method=”get” id=”searchform” class=”searchform” action=”<?php echo esc_url( home_url( “https://wordpress.stackexchange.com/” ) ); ?>”> <input type=”search” value=”<?php echo get_search_query(); ?>” placeholder=”Search…” name=”s” id=”s” > <input type=”submit” value=”query”> </form> </div> You are missing name=”s” id=”s” which is needed to add in terms of getting search term. After … Read more

Search.php Modification Needed

How will you know that the returned page / post is the one that the user is looking for? In any case, have a look at content-search.php (theme twentyfifteen). If you replace ‘the_excerpt’ with ‘the_content’, it will show you the full page.

Search Results Customization

You can modify any query in pre_get_posts filter. So your code could looks like this: function prefix_modify_search( $query ) { if( $query->is_search && $query->is_main_query() ) { $search = $query->get( ‘s’ ); $search .= ‘*’; $query->set(‘s’, $search); } } add_action( ‘pre_get_posts’, ‘prefix_modify_search’ ); Note that the query parameter is passed as reference so you don’t need … Read more

I’ve messed up the admin search functionality. Help!

You can check if is_admin or not in the first line of the function add_filter(‘posts_where’, ‘advanced_search_query’ ); function advanced_search_query( $where ) { if(is_admin()){ return $where; } if( is_search() ) { global $wpdb; $query = get_search_query(); $query = like_escape( $query ); // include postmeta in search $where .=” OR {$wpdb->posts}.ID IN (SELECT {$wpdb->postmeta}.post_id FROM {$wpdb->posts}, {$wpdb->postmeta} … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)