after choosing dates, visitor is sent back to home page

[ad_1]

Hello,
I see this: https://lopezb.d.pr/i/wmgLuM

It seems that the URL of the datepicker action was modified. Please check your custom code or any third party because this doesn’t come from WP Hotelier.

what should that action be then? as I haven’t changed anything and just updated the plugin to ensure that wasn’t a problem?

The URL should point to the listing page. This is a screenshot from the Manila demo:
https://lopezb.d.pr/i/I7Xsz8

Are you sure that you don’t have the filter “hotelier_datepicker_form_url” somewhere in your theme or plugins? Or are you overriding the datepicker template in your theme (your-theme/wp-hotelier/global/datepicker.php)?

I am sorry, you are right i must have added a filter to functions.php in the past and forgot.

i am currently using this function to jump to the _listing shortcode on the page – any idea how to customize this to still let the plugin set the url but just jump to the shortcode section?

function hotelier_custom_datepicker_redirect( $url ) {
    $custom_url="/#results";

    return $custom_url;
} 
add_filter( 'hotelier_datepicker_form_url', 'hotelier_custom_datepicker_redirect' );

This should work:

function hotelier_custom_datepicker_redirect( $url ) {
    $url = $url . '#results';

    return $url;
} 
add_filter( 'hotelier_datepicker_form_url', 'hotelier_custom_datepicker_redirect' );

Yes that works thanks so much. sorry for my lack of memory!

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer