Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with shortcode #929

Closed
stacef opened this issue Feb 4, 2022 · 1 comment
Closed

Use with shortcode #929

stacef opened this issue Feb 4, 2022 · 1 comment

Comments

@stacef
Copy link

stacef commented Feb 4, 2022

Description of Problem

Hi there. I really like your plugin and it works flawlessly when I add a gallery to a post (custom post type). But I would like to include the gallery within the php template using do_shortcode. However, when I do, the plugin no longer works.

In the post, I use [gallery columns="6" ids="56,74,55,54,53,52,51,50"]. In the page template, I use do_shortcode( '[gallery columns="6" ids="56,74,55,54,53,52,51,50"]' ). In both cases, the gallery displays without issue, html seems to be identical, but the do_shortcode version goes to an attachment page instead of using displaying with Simple Lightbox.

Any thoughts or ideas welcomed!
Thanks

Details

  • URL of Page exhibiting problem:
  • https://familyfeld.net/tree/people/louis-eustace-felder-jr/.
    *login required: use simplelightbox/simplelightbox
  • Browser(s) exhibiting problem (Firefox, Chrome, etc.): Using Chrome
  • Version of SLB Installed: 2.8.1
  • Other plugins installed: Only a couple of simple ones built by me. I don't think it's a plugin conflict because SLB works as expected in all other contexts beside do_shortcode.
@archetyped
Copy link
Owner

Hi, you can use slb_activate() to enable the lightbox for content outside of the standard content areas.

Please see SLB's Activation documentation for full details and examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants