Comments (9)
Hi, is the slideshow part of the post's content? SLB automatically activates links in specific content areas such as post content and widgets (optional).
Links in other parts of the page can be activated using slb_activate()
in the template file. See here for more information on using slb_activate()
.
from simple-lightbox-extensions.
Hi, thanks for the reply. The slideshow is part of a loop querying a custom post type, not the main page content loop
Tried slb_activate with both manual coded link, and the_content()... neither is working unfortunately.
I have this within the custom post type queried loop:
$content = the_content();
if ( function_exists('slb_activate') )
$content = slb_activate($content);
echo $content;
from simple-lightbox-extensions.
Hi, first a quick note: the_content()
outputs post content directly to the page. To save post content to a variable, you would need to use get_the_content()
(documenation):
// Save post content to a variable for further processing
$content = get_the_content();
However, SLB should automatically activate any valid links output to the page using the_content()
. There is no need to use slb_activate()
. How is the slider added to the post's content? Can you provide an example of what the post content looks like that the slider is added to?
Thanks.
from simple-lightbox-extensions.
OK thanks, reverted back to just using the_content();
This is the page in question: http://ttp.wordpress-staging.uk
There are 3 query loops on the page, it's the second I'm having trouble with.
-
Simple ''if have posts" ... gets the page content, reset query at the end. Fills the first slide of the slideshow.
-
Fills the remaining slide 2 onwards with custom post-type content. This is where the lightbox link isn't working (see slide 2 on the page example). Code example:
` 'homeslides')); ?>
Slides needed!
`- Fills the rest of the page with a second custom post-type.
from simple-lightbox-extensions.
Thanks for the additional details. That should work just fine with SLB, but it look like something may be preventing SLB from activating the links. Here are some steps you can take:
- Make sure the theme's template file meets SLB's minimum requirements
- You can also test this loop output in another template file where SLB is confirmed to be working.
- Check for plugin/theme conflicts - Does SLB work on that video when Swiper, etc. are temporarily disabled?
Also, a couple questions:
- Is the content for each slide added to the post as raw HTML, or via a shortcode/plugin?
- What is the custom content type's slug? (in case this is causing a conflict somehow)
Let me know what you find and I'll take another look if necessary.
from simple-lightbox-extensions.
OK thanks again, I really appreciated your time helping here.
Pretty sure i'm meeting those requirements. This page with the same vimeo link in the content works fine: http://ttp.wordpress-staging.uk/video-test-page/
...so I would assume it's not down to plug-in conflicts or missing theme elements.
The content for a slide is plain text added in the TinyMCE of the custom post type in question. Exactly the same as the working page demo. In fact the slug for the post works fine too: http://ttp.wordpress-staging.uk/homeslides/showreel/
I've duplicated my front-page.php template, and used it as a custom page template here:
http://ttp.wordpress-staging.uk/badger/ ... and the vimeo link on the second slide works perfectly.
Now I'm doubly confused. It doesn't work on the homepage, but does everywhere else. Sorry!
from simple-lightbox-extensions.
Do you have SLB enabled for the home page in SLB's settings? If so, is activation for any other content types disabled?
from simple-lightbox-extensions.
I didn't, no. Now I have and it's working. I'm an idiot. Sorry for taking up SO much of your time and thanks loads for helping. I'm going to go and bang my head against a wall now. Thanks again...
from simple-lightbox-extensions.
No problem :) Glad to hear your issue was resolved.
from simple-lightbox-extensions.
Related Issues (20)
- Product Image Doesn't Open In SLB but Product Gallery Images Do HOT 4
- Refund?? [Feedback]: HOT 1
- [Compatibility] CDN Support
- [Compatibility/Theme]: Divi
- [Video / Feedback]: Refunds? HOT 1
- [Video] Not playing on Wordpress site (Stockholm theme) HOT 2
- [Video / Request]: Allow for custom video platforms/sources HOT 1
- [Video / Issue]: Pricing confirmation HOT 2
- [Video / Request]: リンク切れの対応 HOT 1
- [WooCommerce/Support]: HOT 1
- [WooCommerce/Support]: Woocommerce with Generatepress Theme not working HOT 3
- Notice: Support Offline until April 10
- [Request]: Support for Fotomoto API for integration
- Does video add-on support self hosted videos? HOT 1
- [Video / Request]: add support for youtube-nocookie (aka privacy enhanced mode) HOT 1
- [Plugin/Compatibility]: Advanced Custom Fields (ACF) HOT 12
- [Video / Feedback]: Need update notification within WordPress HOT 1
- [Video / Request]: Alert user when video is unavailable HOT 1
- Not working on WordPress HOT 4
- Simple Lightbox: WooCommerce Extension HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from simple-lightbox-extensions.