• Resolved Wilfredo Perozo

    (@wiljope007)


    Please Greg, is there any way in which the Results found for the search show only the image and the information of the advertisement and not the indication to continue reading and the menus ???

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    Hi,
    the page on the left side does not seem to look like something generated by WPAdverts, can you paste a link to a page where i can see it?

    Thread Starter Wilfredo Perozo

    (@wiljope007)

    Plugin Author Greg Winiarski

    (@gwin)

    This is the default WP search results page it searches in all of the public post types, using the [adverts_list] layout here might not be the best idea as not all the items listed here will have all the Advert related information.

    I understand you are doing a search from the search input in the right sidebar and would like it to show Adverts only?

    If so then the best solution would be to redirect this search back to the page with [adverts_list] adding the code below in your theme functions.php file will do that

    
    add_action( "wp", function() {
        if( isset( $_GET["s"] ) && ! empty( $_GET["s"] ) ) {
            $url = get_permalink( adverts_config( "ads_list_id" ) );
            $url = add_query_arg( "query", $_GET["s"], $url );
            wp_redirect( $url );
        }
    });
    
    Thread Starter Wilfredo Perozo

    (@wiljope007)

    Ok Thanks Greg!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Results found for the search’ is closed to new replies.