add_filter( 'pre_get_posts', 'tgm_io_cpt_search' ); /** * This function modifies the main WordPress query to include an array of * post types instead of the default 'post' post type. * * @param object $query The original query. * @return object $query The amended query. */ function tgm_io_cpt_search( $query ) { if ( $query->is_search ) { $query->set( 'post_type', array( 'post') ); } return $query; }
Bạn gắn code trên vô functions.php lưu lại và thực hiện thôi.
Chúc bạn thành công
Tagged with: share code, share functions seach wordpress, share seach.php
Despite recent reports that the standard corporate web risk is normally raising, investigations experience revealed that normally fail to...
A virtual data bedroom is a web-affiliated repository of documents and also other information utilized for business transactions. It is...
Today's board of administrators software applications are designed to make the do the job of the company more efficient. They get rid of the need...
Custom research papers are one of the most cost effective alternatives available in the industry today. The most significant element of the papers is...
Thêm mục đăng bài trong danh mục sản phẩm " Add editor to Wordpress WooCommerce Product Category Page ", nhiều người đang cần...
Bình luận bài viết
Đăng nhập để bình luận và xem các bình luận khác.