• Resolved Skalders

    (@skalders)


    Hi, I would like to have a popup available where shortcodes do not work. For example a button in the menu. Is there any way to achieve this? Any way to have a href link to the popup? Or use the shortcode directly in a link?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author useStrict

    (@usestrict)

    Hi @skalders,

    Sorry for the delay. You can select the Popup Text option in the settings.

    Cheers,
    Vinny

    Thread Starter Skalders

    (@skalders)

    Hello,

    I understand, but that is only for shortcodes. I would like to have a popup where shortcodes do not work. In my case I want a menu button to open the popup. I cannot use a shortcode in wordpress menu links, at least I do not know how.

    Plugin Author useStrict

    (@usestrict)

    Ok, here’s one way to do it (probably not the best way).

    1. Create a link shortcode using the Text Pop-Up and place the shortcode in the text body somewhere;
    2. Add CSS to hide it – you can use the tag’s ID attribute;
    3. Make sure the menu link has an ID or unique class name and href=”#”, we’ll use it in a bit;
    4. Add the following snippet of Javascript, replacing the element identifiers accordingly:
      jQuery(document).ready(function($){
          $('#the-menu-link').on('click', function(){
              event.preventDefault();
              $('#the-popup-text-link').click();
          });
      });

    I tested it on the browser console and it worked.

    Cheers,
    Vinny

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Menu & custom buttons’ is closed to new replies.