WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Using ACF fields on the menu

[Resolved] Using ACF fields on the menu

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Diana Koenraadt

    @anaid

    Hi Jos,

    thanks for your suggestion. I haven’t looked into it yet but: I will not tightly couple my plugin with another or execute PHP from another source.

    What I can do is add support for arrays and flatten them to a comma-separated list of their values. I can’t do anything right now, I’ve got a deadline in two weeks, but after that I’ll install ACF and see what I can do.

    Thank you for posting.

    Kind regards,
    Diana

    Plugin Author Diana Koenraadt

    @anaid

    I’ve started working on this, sorry for the delay.

    Plugin Author Diana Koenraadt

    @anaid

    Hi Jos,

    getting back to you on this one: What is it you want to display? The array that is returned by ACF contains nothing but post IDs [1,2,3].

    What kind of information is it you want to display?

    I’m thinking about nesting the structure. If posts 1, 2, 3 have titles “Title1”, “Title2”, “Title3”, %post_my_field(“(“, %post_title, “)”) would result in the display of “(Title1, Title2, Title3)”. You’d be able to use all properties for the nested posts, etcetera.

    Kind regards,
    Diana

    Diana:

    Post titles,that is exactly what I need.

    Greetings

    Plugin Author Diana Koenraadt

    @anaid

    Hi Jos,

    I’ve made a change which you can try out in the Development version, which you should be able to grab from

    http://plugins.svn.wordpress.org/category-posts-in-custom-menu/trunk/

    You will be able to use

    %post_my_field(%post_title) if my_field returns an array of post IDs.
    This returns “Title1, Title2” if my_field returns the ids for two posts with these titles.

    Furthermore, you can add brackets around it like so:

    (<yourbracketinghere>%post_my_field(%post_title)<yourbracketinghere>)

    which will yield
    “<yourbracketinghere>Title1, Title2<yourbracketinghere>” if there are posts.

    Important: You cannot use spaces in <yourbracketinghere>!

    This extension is asking a lot from the plugin, and to be honest I think it makes it less elegant and more prone to errors, so I’m not sure about including this in the stable version.

    I’d like to ask you to grab the Development version and test this, let me know if this solves your question and whether you encounter any problems.

    Kind regards,
    Diana

    Plugin Author Diana Koenraadt

    @anaid

    No further response received.
    ACF field integration will not be supported in future versions of the plugin.
    Closing topic.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Using ACF fields on the menu’ is closed to new replies.