[Resolved] Custom URL

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Custom URL

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #18361
    Samuel
    Participant

    Hi,

    I already post my question on the Generate Press forum but maybe better if I’m asking here :

    Basically I want to redirect to a custom URL. Custom URL that would be calling from a custom field present in each post.

    In each post I have a custom field, name is “url-booking” and value is the custom URL. I think the call would be something like get_field($url-booking); but I really don’t know how to configure it with WPSP.

    Hope this is clear enough,
    Thanks a lot,
    Samuel

    #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;
    } );
    #18374
    Tom
    Keymaster

    Hi there,

    As of right now, no filter exists there.

    I agree that it would be a good filter to have – I’ve made a note of this for the next version.

    #18378
    Samuel
    Participant

    Thanks for your reply Tom,

    Just to know what’s the next step for me, do you have any idea about when a new version would be released ?

    #18391
    Tom
    Keymaster

    We had a meeting about this yesterday. We’ll be trying to get an update out for free and pro within a month.

    #18432
    Samuel
    Participant

    Thanks a lot

    #18439
    Tom
    Keymaster

    No problem 🙂

    #19164
    Samuel
    Participant

    Hi Tom,

    Can you confirm me you’re adding this filter we were talking about in the next update coming ?

    Thanks a lot

    #19185
    Tom
    Keymaster

    Hi there,

    Yes, you can see it here in 1.2: https://github.com/tomusborne/wp-show-posts/blob/release/1.2/wp-show-posts.php#L460

    We’ll be entering alpha testing soon 🙂

    #19241
    Samuel
    Participant

    Great news ! Thanks Tom

    #19247
    Tom
    Keymaster

    No problem! 🙂

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.