Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Custom URL Reply To: Custom URL

#18363
Samuel
Participant

Hi again,

I just wanted to add that I would need this only for custom post types called “hotel”.

I really don’t speak the php and it’s frustrating because I know it would something like “if post is hotel then link to custom url”

I saw a reply you made regarding a similar request for gallery

So would it be something like this possible ?

add_filter( 'wpsp_post_href', function( $href ) {
    if ( 'hotel' == get_post_type() ) {
        return get_field($url-booking);
    }

    return $href;
} );