• Hi, and thank you for this amazing plugin!

    I am trying to render a shortcode via a modal window, but unfortunately the content is not being created. The shortcode is supposed to display the content of some custom fields in the post.

    As you can see here: https://www.steinway.co.uk/pianos-used/
    After you open the modal box for the only Piano you see on that page, next to Year, Mod, Price there should the value typed in the custom fields, but it’s blank.
    Also it breaks the slider that comes from Visual Composer, shich works well outside the modal box.

    The box is showing a custom post which works normally if you open it outside the modal box, but if you load it through the modal it won’t work.

    Screenshot of the visual editor: https://prntscr.com/8p3j5z

    The grid system is Themepunch’s Essential Grid plugin, they investigated and they said to ask you why the modal box is not rendering the shortcode.

    I know this is a free plugin with free support, but I am willing to pay a subscription fee if there is any as it’s very important to me to get this sorted by this weekend ??

    Thank you very much.

    https://www.ads-software.com/plugins/easy-modal/

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Pelly Benassi

    (@plasmax)

    I have also tried with Popup Maker, the shortcode keeps rendering no content.

    Plugin Author Daniel Iser

    (@danieliser)

    @plasmax – Check out Popup Maker https://www.ads-software.com/plugins/popup-maker. It is a much improved version of Easy Modal. It should work better for what your trying to do and recently added basic VC support.

    Thread Starter Pelly Benassi

    (@plasmax)

    hi danieliser, like I said I have just tried with Popup Maker as well but it breaks the visual composer and doesnt show the shortcode content ??

    Thread Starter Pelly Benassi

    (@plasmax)

    it’s like the visual composer doesnt load instantly, for example there is a slider which comes with the visual composer that starts working only after a few seconds and not as soon as you open the popup.

    Also the columns from VC are all messed up and not following the row template I am using in the editor…

    This behaviour is exactly the same on both v2 and v3 of your plugin.

    Plugin Author Daniel Iser

    (@danieliser)

    @plasmax – What version of VC are you using. I tested with the latest and was able to build column layouts pretty easily.

    As for the slider not loading that is in VC and we have no control over that. Some elements may not work as expected in that sense but overall support is there in the latest version of Popup Maker.

    Thread Starter Pelly Benassi

    (@plasmax)

    VC is version 4.6.2, I will try to update tomorrow but it’s already a quite recent version anyway…

    I’ll give up with this as I am not an expert coder and nobody can help me with this as VC will say to ask you, you’ll say to ask them, and ThemePunch will say to ask both of you.. I understand nobody can spend his time to properly investigate for free and it’s not easy to understand where the issue comes from.

    Any suggestions about the shortcode instead?

    This is the code I have added to functions.php:

    // add shortcode for Essential Grid's custom fields
    add_shortcode('grid_meta', 'print_grid_meta');
    
    function print_grid_meta($atts) {
    
        global $post;
        $meta = get_post_meta($post->ID);
    
        extract(shortcode_atts(array('key' => ''), $atts));
    
        if($key && array_key_exists($key, $meta)) {
    
            return $meta[$key][0];
    
        }
    
    }

    It does show the content of the shortcode on the single post but not when it’s loaded in the modal box.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Modal not processing Shortcode’ is closed to new replies.