Opening a popup ninja from php

Opening a popup ninja from php

Checking the documentation from popup ninja plugin on how to open the popup from a link, the only available option is how to open from a blog post. But if you want to add the link in your website using php, you need to use the wordpress function do_shortcode. The documentation doesn’t show how to add a do_shortcode with content between the tags.

To open the popup with php, simply get the popup ID and use the code bellow. Just remember to change the text for your desired one.

< ?php echo do_shortcode( '[ninja-popup ID=1234]'.'text to open popup'.'[/ninja-popup]' ); ?>
Read More

Checking if php-curl is installed

If you wanna check if php-curl extension is installed in your system, type on terminal

sudo php -m | grep "curl"

If the response from the code above is empty, the extension is not being loaded with php. Then you can install it with:


yum install php-curl


sudo apt-get install php5-curl
Read More