I’m trying to make a site-specific plugin that displays content via shortcode when the browser resolution is that of a mobile device. I use this in the theme files of another installation, it’s called Mobile Detect on github. The end result is to add a shortcode that displays a MailPoet mailing list form in the middle of content.
The trouble is that I require once the file within the plugin and end up with an uncaught error saying $detect is undefined. So the file isn’t being included. I tried require once in the custom template of the page itself and I still have no luck.
What am I getting wrong?
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.