• Resolved yessirmr

    (@yessirmr)


    Hello,

    I am having trouble with custom fields.

    I use ACF and I have created url field with name links.
    I have also created Custom Field under the MLA -> Custom fields called links (see the setup here – https://ibb.co/Bbq812S)
    I see the column in assistant table – MLA Column, it is called Links.
    In my code I use href=”{+meta:links-url+}” but when I visit from front end and do inspect element the href is empty – href=””

    Could you please guide me what I am doing wrong?

    Best Regards,
    Janis

Viewing 1 replies (of 1 total)
  • Plugin Author David Lingren

    (@dglingren)

    Good to hear from you again, and thanks for your question and for the screen shot of your custom field rule; very helpful. I hope I can clear up some confusion around how the term “metadata” is used in WordPress.

    In WordPress, the term “metadata” is often used interchangeably with “custom fields”. WordPress also has a separate data structure, “Attachment Metadata”, that contains a number of elements describing a Media Library item. You can see this special structure in the “Attachment Metadata” text box on the Media/Edit Media admin page. In MLA, the meta: prefix is used to access these elements. To access a custom field, MLA uses the custom: prefix.

    For your application, something like href="{+custom:links+}" should work. I’m not sure why you used links-url as the field name because your rule shows the name to be simply links. If you need to URL encode the field content you can use something like href="{+custom:links,url+}". The ,url suffix is an MLA format/option code that applies the encoding.

    You might have also noticed the “Attachment File Metadata” text box on the Edit Media admin page. This displays the metadata embedded in the file itself using the IPTC, EXIF and XMP standards. Yet another variation on the “metadata” theme.

    I hope that gets you started on a solution for your application. I am marking this topic resolved, but please update it if you have problems or further questions regarding the above suggestions. Thanks for your interest in the plugin.

Viewing 1 replies (of 1 total)

You must be logged in to reply to this topic.