WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] ACF Relationship Field Display As Text Instead Of Array (4 posts)

  1. DJLunacy
    Member
    Posted 1 year ago #

    Hello,

    I have a custom field that is referencing content that is a custom page type.

    In the relationship field (edit screen) it will allow them to select more then one piece of content to associate with the field.

    However when I call the field via EM it displays it as an array.

    What would be the preferred method to get for example #_ATT(custom-multi)

    to render as a list (a link to the page bonus) instead of just an array that looks like this?

    ex. Cust:a:1:{i:0;s:4:"3538";}

    I've seen various suggestions that seem like they might be a solution, however with the amount of places one could put this within the system my heads about to explode.

    Also, for quick and dirty mods or tests, It would be nice if there was an easy way to enable php code in the EM templates in the admin section, if this doesn't already exist and I've missed it.

    Thank You!

    http://wordpress.org/extend/plugins/events-manager/

  2. agelonwl
    Member
    Posted 1 year ago #

  3. DJLunacy
    Member
    Posted 1 year ago #

    Nope, that won't help me out at all.

    I'm talking about custom fields in the event pages, not locations.

  4. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    ACF serializes the custom field info, so what you'd probably want to do is create a custom placeholder and call the meta using ACF's method agains the $EM_Event->post_id

    http://wp-events-plugin.com/tutorials/create-a-custom-placeholder-for-event-formatting/

    Also, for quick and dirty mods or tests, It would be nice if there was an easy way to enable php code in the EM templates in the admin section, if this doesn't already exist and I've missed it.

    you could try using wp's hooks, like option_... and then run exec() on the content. we wouldn't implement this

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic