• Resolved chrisalton11

    (@chrisalton11)


    My previous search plugin would show “Private” status products to the admin as long as they were logged in, but it seems that FiboSearch doesn’t allow this.

    Is that true?

    Thanks,
    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Kris

    (@c0nst)

    Hi @chrisalton11

    Use this code snippet:

    add_filter( 'dgwt/wcas/search_query/args', function ( $args ) {
    	if ( current_user_can( 'manage_options' ) ) {
    		$args['post_status'] = [ 'publish', 'private' ];
    	}
       
       return $args;
    } );

    You have two ways to add this code to your theme:
    Open the functions.php in your child theme and add the code at the end.
    or install the Code Snippets plugin and apply this code as a snippet.

    Regards,
    Kris

    Thread Starter chrisalton11

    (@chrisalton11)

    Kris,

    Thanks so much- That’s very helpful.

    Have a great day,
    Chris

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘FiboSearch Private Products & Posts’ is closed to new replies.