Support

Account

Home Forums General Issues Link to post or url? Reply To: Link to post or url?

  • This has been requested many times and I think it’s low on the priority list. The best way to handle this is to have 3 fields. The first a radio field to select either to add a page link or a URL. Then the other two fields use conditional logic. Once this is set up

    
    if (get_field('radio') == 'page_link') {
      // code for page link
    } else {
      // code for url
    }
    

    I think that this is the main reason that it may be low on the developer’s “To Do” list, because with very little work it’s easy enough to accomplish. Basically this does exactly what a field that allows either a page link would need to do even if it were built in.