Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › search button floating › Reply To: search button floating
August 8, 2022 at 3:06 pm
#38760
Keymaster
Sure, no problem.
To automatically place the plugin shortcode on all of the pages, you can either put it in a footer widget, or use a custom code as well. Try adding this code to the functions.php file in your theme/child theme directory – make sure to have a full server back-up first for safety. For more details you can check the safe coding guidelines.
add_action('wp_footer', 'asp_add_shortcode_automatically', 999999);
function asp_add_shortcode_automatically() {
echo do_shortcode('[wpdreams_ajaxsearchpro id=2]');
}
To fix the position of the search, on the compact layout settings change the position to fixed: https://i.imgur.com/VCnXDyH.png