Simple Lightbox
[resolved] using in a custom theme using custom field (2 posts)

  1. sn0z33r
    Posted 3 years ago #


    i've test your plugin, if the template files using the classic loop to retrieve the message using the_content() function all works fine... but in my case i've the following situation. I've more posts and more pages but my custom template doesn't show the pages but only the posts. The pages post was used as "static part" of more posts.
    So in another words my template call the standard loop to get the content of the post, every posts have one custom field that contains the associated page id so when i build the frontend page this are the steps:
    1) call the loop to get the content of the post
    2) reading the custom field
    3) get the content of the associated page using get_post_meta() and get_page() functions

    at this point the get_page() function return me an object with all the data and i show to the screen using echo $page->post_content

    Ok now the problem, i insert the image into the page file but when i navigate on my frontend post i correctly see the image but when i click on it the lightbox animation doesn't start...

    can i solve my problem or not ?

    I've try to look inside your model.php but i can't understand the problem :(

    i'hope that my english is ok because is not my mother language ;)



  2. Archetyped
    Plugin Author

    Posted 3 years ago #

    The best approach would be to output the associated page content using a standard WordPress loop so that plugins that work with post/page content (including SLB) can properly process its content.

    Have a look at WordPress' documentation on the Loop, an in particular the section on nested loops.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simple Lightbox
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.