• Resolved Devin J Dawson

    (@devinjdawson)


    Is there an easy way to display posts in lightboxes? I would like the content from my recent posts page to show up in a lightbox without the header and footer.

    This is not my website, but it is a site that utilizess this idea:https://canopy.co

    When you click a product, instead of opening to a new page, it opens to a lightbox with the content.

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi,

    I don’t think there is such a plugin built to work with Customizr theme.

    Thank you

    Thread Starter Devin J Dawson

    (@devinjdawson)

    I would mostly have to edit the functions and or create a new custom template. I have looked into creating custom templates but I wants to see if there was some built in hook I was missing. Either way, it’s an interesting feature to consider.

    Thanks guys!

    Thread Starter Devin J Dawson

    (@devinjdawson)

    This is the current code i came up with. I specifically want to show post listed in the recent posts grid in a light box.

    add_filter('__grid_single_post_content', 'tc_grid_display_post_link');
            function tc_grid_display_post_link(){
              if ( ! apply_filters( 'tc_grid_display_post_link' , true ) )
                return;
              printf( '<a class="tc-grid-bg-link" href="%1$s" title="%2$s" rel="tc-fancybox-group1"></a>',
                  get_permalink( get_the_ID() ),
                  esc_attr( strip_tags( get_the_title( get_the_ID() ) ) ) );
            }
    Thread Starter Devin J Dawson

    (@devinjdawson)

    To display post in a fancybox (same thing as lightbox):

    Add class="grouped_elements" to your link code, ie.,

    <a class="grouped_elements" href="https://example.com/post" title="example.com/post" >example.com/post</a>

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Post in a Lightbox’ is closed to new replies.