WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. sn0z33r
    Member
    Posted 12 months ago #

    Hi,

    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 ;)

    regards

    http://wordpress.org/extend/plugins/simple-lightbox/

  2. Archetyped
    Member
    Plugin Author

    Posted 12 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.