• Resolved Tobias

    (@tobiaseichner)


    Hello,

    I noticed an unusual behavior in the publicly visible search results:

    I have some pages saved in “Draft” status for one site. However, these show up in the public search results, with the links going nowhere, of course.

    An example: A search on meinfilou.de for the string “aua” shows as hit “Pf?tchen hat Aua” – this page exists, but only in the status “draft”. (Site is on latest WP and Relevanssi versions.)

    Guess that this is not intended and should get fixed.

    Kind regards
    Tobias

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    Relevanssi is working correctly as you can see from the actual search results page where the “Pf?tchen hat Aua” post does not show up. This problem is in Live Ajax Search.

    I will fix this in the next version of Live Ajax Search; meanwhile, you can use this quick fix:

    add_filter( 'relevanssi_live_search_query_args', function( $args ) {
    	$args['post_status'] = 'publish,inherit';
    	return $args;
    } );

    Add this to your site (in theme functions.php or in a code snippet).

    Thread Starter Tobias

    (@tobiaseichner)

    Thanks. ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Public search results include pages with draft status’ is closed to new replies.