Custom Fields
Re-Envisioned
Support MB Custom Post Type Shortcode not displaying

  • Creator
    Topic
  • #28268
    auldreekie
    Participant

    I'm using Metabox Custom Fields to add fields to a Metabox custom post type, which in turn is used to display markers and popups on a leaflet.js map.

    When editing custom posts, admin users should be able to either add some free text, or paste a shortcode that will display the contents of that shortcode in the map popup.

    The shortcode just holds a chunk of predefined text, edited in a third party content blocks WP plugin. The text can then be edit once > change in multiple map markers.

    The custom field that the shortcode is added to is location_content_shortcode.

    It's called in my list.js file like this:

    var popupContentShortcode = '';
            if (location.location_content_shortcode) {
                popupContentShortcode = '<p>' + location.location_content_shortcode + '</p>';
            }

    But on the website frontend, just the shortcode shows - [ls_content_block slug="tier-1"]

    Any idea how I can fix this?

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