• Resolved grungyape

    (@grungyape)


    I want to replace a current search tool in my site theme with Relevanssi. The current search is “built in” with a function_exists clause, I’d like to replace it with Relevanssi, but do not know what the proper phrase is to say “is Relevanssi installed and active”

    Here is what I have now that needs replaced:
    <?php if ( function_exists( ‘yith_ajax_search_constructor’ ) ) { ?>

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

    (@msaari)

    You can check for the relevanssi_query function.

    Thread Starter grungyape

    (@grungyape)

    Most excellent, thank you. I now have (and working as intended):

    <?php if ( function_exists( ‘yith_ajax_search_constructor’ ) ) { ?>
    <?php echo do_shortcode( ‘[yith_woocommerce_ajax_search]’ ); ?>
    <?php } else if ( function_exists( ‘relevanssi_query’ ) ) { ?>
    <?php echo do_shortcode( ‘[searchform]’ ); ?>

    This request is resolved!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘function_exists?’ is closed to new replies.