Tips and Tricks HQ Support Portal › Forums › WP Lightbox Ultimate › Lightbox Ultimate – Need html page shortcode in template file
- This topic has 5 replies, 2 voices, and was last updated 12 years, 2 months ago by wpCommerce.
-
AuthorPosts
-
August 30, 2012 at 11:37 pm #7277mayaf7Member
I’m trying to use the html overlay using php echo do_shortcode within my template index.php file but I can’t seem to get it working: http://angiemay.com/clients/chartis/wordpress
The code is set up with multiple links with images.
<a href="#">
<span>Link Name</span><img src=”imagename” />`What I want is to be able to keep the code above and add the overlay feature to show pages like: http://www.angiemay.com/clients/chartis/wordpress/business-systems/
I tried just adding the “href” with rel=”wp_lightbox_prettyPhoto” for the “a” which can be seen on the index page but it wouldn’t overlay, it would just go the business-systems page. What am I doing wrong?
August 31, 2012 at 11:54 pm #48846wpCommerceModeratorHi, Are you using the inline HTML overlay shortcode or the external page display shortcode?
I believe you need the embed the shortcode on a template file like the following:
September 3, 2012 at 5:27 pm #48847mayaf7MemberI’m using the HTML overlay shortcode for external page display: `<?php echo do_shortcode(‘[wp_lightbox_anchor_text_display_external_page link=”http://www.angiemay.com/clients/chartis/wordpress/business-systems” width=”670″ height=”480″ title=”” text=””]’); ?>
The problem being that I don’t know how to incorporate the shortcode with the structure and style that I have established (shown above). So the “a”, the “a span”, and the image within the “a” have specific styles.
September 3, 2012 at 11:38 pm #48848wpCommerceModeratorHi, That’s just a shortcode. When the page loads it will get filtered with a HTML code. The code is linked by either an anchor text or image (it depends on what shortcode you are using). Lightbox window gets triggered when someone clicks on the shortcode anchor.
Now if you have your own customized code that you want to trigger using lightbox that’s a different scenario. You will have to figure out a way to do that. The only thing that I can help you with is finding the HTML equivalent code for a shortcode:
Note: I believe your theme doesn’t have the
wp_footer()
call. Lightbox Ultimate plugin includes some additional JavaScript codes in the footer so it doesn’t affect your page load time.Please take a look at the following post. It will help you understand the issue.
September 4, 2012 at 12:18 am #48849mayaf7MemberThank you! Once I added the wp_footer() call everything worked. Not sure how I missed that!
September 4, 2012 at 1:29 am #48850wpCommerceModeratorYou’re welcome. I’m glad to hear that It’s working for you now.
-
AuthorPosts
- You must be logged in to reply to this topic.