im new posting in the forum, but here i found answers without ask, just searching, thanks about that.

Here go my questions:

I have a custom post type called ‘publicacion’ and there the next custom WP_Query:

$query_args = array( 
        's' => mysql_real_escape_string( $_GET['s'] ),
        'post_type' => 'publicacion',
        'meta_key' => 'meta-box-fp'
    );
    if( $_GET['autor'] != '' ) {
        $query_args['tax_query'] = array( 
                                        array( 
                                            'taxonomy' => 'autores', 
                                            'field' => 'slug', 
                                            'terms' => mysql_real_escape_string( $_GET['autor'] ) 
                                        ) 
                                    );
    }
    if( trim( $_GET['fini'] ) != '' || trim( $_GET['ffin'] ) != '' ) {
        $query_args['meta_query'] = array ( 
                                        array( 
                                            'key' => 'meta-box-fp',
                                            'value' => array( mysql_real_escape_string( $_GET['fini'] ) . '-00-00', mysql_real_escape_string( $_GET['ffin'] ) . '-00-00' ), 
                                            'type' => 'DATE',
                                            'compare' => 'BETWEEN' ) 
                                    );
    }
    if( isset( $_GET['ord_by'] ) ) {
        $ordby = mysql_real_escape_string( $_GET['ord_by'] ) == 'year' ? 'meta_value' : mysql_real_escape_string( $_GET['ord_by'] );
        $query_args['orderby'] = $ordby;//mysql_escape_string( $_GET['ord_by'] );
        $query_args['order'] = 'DESC';//mysql_escape_string( $_GET['ord'] );
    }
    $query = new WP_Query( $query_args );

The ‘s’ parameter redirects to the search page, but i need do the search in the archive-publicacion.php file, and i need the ‘s’ parameter, search for excerpt instead content.
It is possible to do that? Thanks and i hope be clear in my question and excuse me my english.

Read more here: WordPress, search in excerpt instead content


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Related Wordpress search:

, , ,

Wordpress related questions and answers: