Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #178647

    Hi,
    I want to use the WooCommerce Predictive Search widget and search page with the Abundance theme. I can’t seem to find where exactly to place the following code in the header.php file:
    “<?php if(function_exists(‘woo_predictive_search_widget’)) woo_predictive_search_widget(); ?>”

    I did search the forum but what I found did not help me. Can you provide guidance on how to do this?

    Much appreciated,
    Lyse

    #178876

    Hi tremblayly!

    Please edit header.php then place this at the very bottom:

    <?php echo "<div class='woopredictive-search'>" ?>
                <?php if(function_exists(‘woo_predictive_search_widget’)) woo_predictive_search_widget(); ?>
    			<?php echo "</div";

    You can add this on your custom.css or Quick CSS to position the search:

    .woopredictive-search {
    position: absolute;
    right: 0;
    top: 5px;
    }

    Cheers!
    Ismael

    #179098

    Hi Ismael,

    After I copied and pasted the code at the bottom of the header.php just BEFORE the last php closing tag “?>” I get a blank screen when I go to my website.
    After I copied and pasted the code at the bottom of the header.php AFTER the last php closing tag “?>” I can access my website.OK but the search used is not the Woo Predictive Search.

    Am I doing something wrong?

    Lyse

    #179268

    Hi Ismael,
    I had to remove the code from the header.php file because it messes up my shop/product pages very badly.
    I need to know how to make sure this won’t mess up my shop pages. Any help is appreciated.
    Thanks
    Lyse

    #180368

    Hi!

    Please try update Ismael’s code and change it to following one

    echo "<div class='woopredictive-search'>";
                if(function_exists(‘woo_predictive_search_widget’)) woo_predictive_search_widget(); 
    			echo "</div";

    Best regards,
    Yigit

    #180738

    Hi Yigit
    Thank you for that. My pages display correctly with that code, however the search seems to be using the theme search, not the Predictive Search.
    Can you help figure out what this would not work?
    Much appreciated
    Lyse

    Could not reach you by email……

    Hi Yigit,
    I had to remove the code again because, again, the display got screwed up.
    Any resolution to this issue yet?
    Lyse

    • This reply was modified 10 months, 3 weeks ago by  tremblayly.
Viewing 6 posts - 1 through 6 (of 6 total)

The topic ‘Abundance theme and WooCommerce Predictive Search’ is closed to new replies.