- This topic has 3 replies, 3 voices, and was last updated 12 years ago by .
Viewing 4 posts - 1 through 4 (of 4 total)
Viewing 4 posts - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate – embed shortcode in php file?
I have an image embedded below my left navigation item on my onlinestore php page.
I need that image to open a new window to another php page. i was able to do this ON A PAGE but cannot get it to work inside the php file.
The problem is the shortcode doesn’t work inside the php page.
How can i do this? I hope I can as I bought this plugin for that main purpose.
Thanks,
iso
Most shortcodes have corresponding PHP function calls. You could also use the do_shortcode function to call any shortcode from PHP.
Hi, Lightbox Ultimate shortcodes are based on the WordPress shortcode guideline. So if you have a php script which is not running under WordPress you can’t expect the shortcode to work.
If your php script is running under WordPress you can easily execute a shortcode by passing it through the do_shortcode
filter. For example:
<?php echo do_shortcode('[wp_lightbox_anchor_text_display_external_page link="http://www.example.com/my-test-page" width="640" height="480" title="title goes here" text="click here to open the external page"]'); ?>
Thanks, I will try that.
iso