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”
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 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:
Thanks in advance,
The thing is that the “link” post type doesn’t show up in the list
I founr another thread about this here:
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.
Thanks for your help,
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.
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)
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.
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.
The topic ‘Link manager in "Field Type"’ is closed to new replies.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
The ACF site is currently experiencing some issues.— Advanced Custom Fields (@wp_acf) September 21, 2022
We apologize for the inconvenience and we are working hard to get it back up and running as soon as possible.
© 2022 Advanced Custom Fields.