• Resolved markburton52

    (@markburton52)


    I am using shortcodes that display user meta information in WP posts and pages. I can use this shortcode within the tinyMCE classic editor content box to display a UM user cover photo: [um_profile_info type=”image” meta_key=”cover_photo” width=”400″ user_id=”nn”]artist cover photo[/um_profile_info], where nn is the wp user id.
    However when I try to put this into a EM custom attribute, the image does not display.
    I am able to use similar shortcodes with custom attributes to show other information, including a map (using leaflet plugin OSM shortcodes) and text.

    The single location formatting that I’m using for the attribute is,

    <section class="em-event-artist">
    <h3>Featuring: #_ATT{show_name}</h3>
    </section>
    <section>
    <br>#_ATT{ARTISTIMAGE}<br><br>
    <h3>
    What?
    </h3>
    #_ATT{EVENTDESCRIPTION}
    </section><br>

    The other attributes work OK but not #_ATT{ARTISTIMAGE}, which displays in the event post editor as a box like the other attributes but doesn’t come through to the published event post.

Viewing 2 replies - 1 through 2 (of 2 total)
  • joneiseman

    (@joneiseman)

    The #_ATT{ARTISTIMAGE} will look in the postmeta table for an entry with a ARTISTIMAGE meta key for this post. I would guess UM is storing the url of the artist image as the meta value. You can examine the html for the event and verify that that the url for the image is there. To display the actual image you would need to use an img tag. Something like this:

    <img src="#_ATT{ARTISTIMAGE}">
    Thread Starter markburton52

    (@markburton52)

    Thanks, I’ve got it working. It looks like it was the

    <section class="em-event-artist">

    tag that interfered – that was a legacy from an earlier attempt to use user meta to render images in EM. The shortcodes I’m using make the <img> tag unnecessary.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.