• Resolved deterius

    (@deterius)


    Hi guys,
    I’ve been messing around with the lightbox plugins and I can easily open a link in a lightbox window, however- Im having a hard time how to make it so that each post within a category opens in a lightbox.

    I figure I would need to modify each post link to include something like rel=thickbox or class=lightbox but I’m not sure how to do this.
    Any clue will really help!

Viewing 4 replies - 1 through 4 (of 4 total)
  • same here

    Thread Starter deterius

    (@deterius)

    I am king!

    Okay, after weeks of looking, I’ve figured it out!

    I use FACEBOX plug in. So make sure to have that installed.

    1. Strip single.php in your theme file of all headers and sidebars. (I am not sure if it is necessary but I could not do it until I did that). The point is to simplify the posts so they can load in facebox.

    2. Go to functions.php and find `function new_excerpt_more($more)
    {
    return ‘<span class=”read-more”><a href=”‘ . get_permalink($post->ID) . ‘”>Read More</a></span>’;
    }`
    Yours might look different, but that is basically where wordpress generates the “read more” links for your posts (or links to your posts).

    3. Add rel="facebox" to that code:`function new_excerpt_more($more)
    {
    return ‘<span class=”read-more”><a rel=”facebox” href=”‘ . get_permalink($post->ID) . ‘”>Read More</a></span>’;
    }`

    Thanks so much for posting your solution! You are king.

    If you strip out the header how do you link to the style sheet and other scripts?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Open posts in (lightbox) or chrome-less window or even new window’ is closed to new replies.