• Resolved dmarin

    (@dmarin)


    Hi there!

    I have a problem with a Search within WP Books Gallery gallery. When Relevanssi is enabled, then Search by Title (Naslov knjige) does not return any results. When I disable Relevanssi, then the Search for Books works perfectly.

    So, it seems that Relevanssi interferes with WP Books Gallery Search. I tried different options for Indexing, but nothing changes. Are you aware of this problem and do you know if there is a workaround available?

    I was thinking it would help if there is a way to exclude WP Books Gallery custom post from Relevanssi Search? Because it shows that the custom post type “books” is not excluded from search … see screenshot: https://prnt.sc/1wp5cvn

    So, please take a look and let me know if there is solution to this kind of problem.
    Otherwise Relevanssi works great and improves general Search for posts!

    Regards, Danijel

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter dmarin

    (@dmarin)

    By the way: Is it possible to add an option for Relevanssi search to show newer posts first? I don’t see that as an option among “Weights” in Searching options: https://prnt.sc/1wp7flo … it would be good if newer posts could show up higher.

    Thread Starter dmarin

    (@dmarin)

    Can anybody please answer my questions, especially the first one above related to WP Books Gallery custom post search? The plugin in question is https://www.ads-software.com/plugins/wp-books-gallery/

    Thanks!

    Plugin Author Mikko Saari

    (@msaari)

    Sorry, I was travelling and for some reason, the forum did not send me email notifications from this thread.

    So, you want Relevanssi disabled for all searches for the post type books? Adding this to your theme functions.php should make Relevanssi ignore any searches for the post type books:

    add_filter( 'relevanssi_prevent_default_request', 'rlv_books', 10, 2 );
    add_filter( 'relevanssi_search_ok', 'rlv_books', 10, 2 );
    function rlv_books( $do_stuff, $query ) {
    	if ( 'books' === $query->query_vars['post_type'] ) {
    		$do_stuff = false;
    	}
    	return $do_stuff;
    }

    The free version of Relevanssi can sort posts by the publication date, there’s a setting for that, but if you want to add extra weight for newer posts while still sorting posts by relevance, that’s something Relevanssi Premium can do.

    Thread Starter dmarin

    (@dmarin)

    Thank you for your help and reply @msaari!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Compatibility issue – WP Books Gallery’ is closed to new replies.