Hello pixelsoup,
this code you used is wrong
<?php if(function_exists('woo_predictive_search_widget')) woo_predictive_search_widget($character_max(20)); ?>
You have tried to add a max characters function to the default master code.
By that I mean you enter this code
<?php if(function_exists('woo_predictive_search_widget')) woo_predictive_search_widget(); ?>
Which shows the default settings
If you want to over ride the defaults then you should write the function like this
<?php if(function_exists('woo_predictive_search_widget')) woo_predictive_search_widget(6, 0, 0, 0, 0, 0, 20, 'width:200px', true); ?>
But you have got me thinking that would could make this much easier if we enabled it on the admin panel of the Pro version plugin where you just enter the values for the functions and update then just copy and paste the master function into your header.php
That would look something like this
Generate Search Function script:
Enter values for (leave empty for not activated)
Product name [ ]
Product SKU [ ]
Product category [ ]
Product tag [ ]
Post [ ]
Page [ ]
Description Characters [ ]
Padding top [ ]px
Padding bottom [ ]px
Padding left [ ]px
Padding right [ ]px
Global search [true]
Width [ ]px empty to 100%
Custom style [ ] put other custom style for this search box on themes that do not follow the WordPress or WooCommerce codex when it comes to position elements in the header – like the Abundance Theme and Mayashop Theme.
With this in place you will be able to just enter the values – Update then copy and paste the master function into your header.php
<?php if(function_exists(‘woo_predictive_search_widget’)) woo_predictive_search_widget(); ?>
Anytime you want to change it you just make the changes on the Predictive Search admin tab on the WooCommerce shop and update. Won’t have to touch the php file.
This upgrade should be out later today. Thanks