Code Monkey home page Code Monkey logo

Comments (9)

archetyped avatar archetyped commented on September 5, 2024

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.

ttpdigital avatar ttpdigital commented on September 5, 2024

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.

archetyped avatar archetyped commented on September 5, 2024

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.

ttpdigital avatar ttpdigital commented on September 5, 2024

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.

  1. Simple ''if have posts" ... gets the page content, reset query at the end. Fills the first slide of the slideshow.

  2. 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!

`
  1. Fills the rest of the page with a second custom post-type.

from simple-lightbox-extensions.

archetyped avatar archetyped commented on September 5, 2024

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:

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.

ttpdigital avatar ttpdigital commented on September 5, 2024

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.

archetyped avatar archetyped commented on September 5, 2024

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.

ttpdigital avatar ttpdigital commented on September 5, 2024

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.

archetyped avatar archetyped commented on September 5, 2024

No problem :) Glad to hear your issue was resolved.

from simple-lightbox-extensions.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.