Support

Account

Home Forums General Issues Link manager in "Field Type"

Solved

Link manager in "Field Type"

  • Hi,
    I would like to add the link manager (the option to add links) into the field type select box.
    Currently it only shows post types (posts, pages etc…)
    How can I add also the links created with the “link manager”
    http://wordpress.org/plugins/link-manager/

    Thanks,
    Dan

  • Hi @danstramer

    Can you please better decsribe this feature request?
    I don’t understand what you mean by:
    – “add the link manager (the option to add links) into the field type select box.”

    What part of the plugin are talking about here:
    – “Currently it only shows post types (posts, pages etc…)”

    As for your last question, I think this is not ACF related at all. Perhaps you can contact the link manager plugin developer?
    – “How can I add also the links created with the “link manager””

    Thanks
    E

  • Thanks Elliot, I’ll try to explain.
    I have a custom field type of “page_link”
    It creates a drop down of pages and posts to which I can link to.
    I would like to add another post type to this drop down.
    The ideal ‘post_type’ that I would like to add is “link” from the link manager (this used to be built in to wordpress but they took it out of core and now it’s available as a plugin – http://wordpress.org/plugins/link-manager/)
    What I would like to essentially happen is that when the user wants to add a link he will also have the option to add one of the links created via the “link manager” – these links will also show up in the “page_link” drop down just as pages, posts etc.. show up.
    This is the print screen of the “page_link” drop down currently showing only pages, I would like it to show also all the links created with the link manager:
    https://www.dropbox.com/s/7hanixol0jzz91w/page_link_acf.jpg

    Thanks in advance,
    Dan

  • Hi @danstramer

    When creating / editing your page_link field, you can specify the post types to populate the choices.

    Perhaps all you need to do is edit your field, and select the link post type from this plugin?

    Thanks
    E

  • Hi Elliot,
    The thing is that the “link” post type doesn’t show up in the list
    I founr another thread about this here:
    http://support.advancedcustomfields.com/forums/topic/external-link-option-for-page-link/

    I also tried adding another plugin called “Bookmarks” and it does show up in the list but when selecting it it redirects to a page and not to the actual external link.
    http://aaronparecki.com/articles/2009/06/26/1/wordpress

    Thanks for your help,
    Dan

  • Hi @danstramer

    Yes, becuase you are using the ‘page link’ field, this will return a URL to the post. ACF does not know that your post is being used to save an external URL.

    May I ask why you are using a post type to store a URL? This seems a bit complicated when you can just use a text field to store a url with ACF.

    Thanks
    E

  • Hi
    Yes, I am using the page link field since I would like to have a drop down with all the sites pages and to have all the external links also in that drop down. The external links will be added via the link manager ( or similar post type) and would show up in the page-link field so the user can easily select to which URL the specific text would go to ( internal or external)
    Thanks
    Dan

  • Hi @danstramer

    If you wish to use a post type for each link, you will need to change your page_link fields to a post_type field.

    This will allow you get the post ID instead of the URL.

    With the ID, you can attempt to load the custom URL from that post. If there is no custom URL, then load the post’s permalink.

    Good luck

    Thanks
    E

  • Thanks Elliot,
    That’s a bit out of my scope,
    I’ll see if I can solve it in a different way

    Dan

  • I have the same issue, hence Googling and finding this.

    My feeling is WP’s own “Link Manager” was depreciated because it was non-standard.

    My approach is to install it for inspiration on the object design, and then use the “CPT UI” plugin to reproduce it as a Custom Post Type & Custom Taxonomy.

    Maybe 30 minutes work, no code tinkering, and then you own your own Links custom object fully compatible with ACF.

    Therefore achieving the same thing but without relying on any ACF mods.

    Hope that helps.

Viewing 10 posts - 1 through 10 (of 10 total)

The topic ‘Link manager in "Field Type"’ is closed to new replies.