Black Friday sale! Get 25% off WPSP Pro! Discount automatically applied at checkout.

[Support request] Adding categories/tags to the lightbox

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Adding categories/tags to the lightbox

  • This topic has 6 replies, 2 voices, and was last updated 6 months ago by Tom.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #15766
    Andrew
    Participant

    Hey,

    Any way of adding data to show in the lightbox – hopefully categories and tags at least!

    Thanks

    #15774
    Andrew
    Participant

    So, I guess, is there a hook for the lightbox?

    #15799
    Tom
    Keymaster

    Hi there,

    Just dug into the library we’re using for the lightbox (Featherlight: https://github.com/noelboss/featherlight/) and unfortunately I’m not seeing any support for HTML inside the image lightbox feature.

    #15822
    Andrew
    Participant

    No and that’s the same story across the board with other lightboxes as fast as I can see. I can code info into exif data or the image caption/description, for some lightboxes, but it’s not very nice dealing with thousands of entries.

    #15824
    Andrew
    Participant

    Using the overlay style 2 card, how can I add tags and custom taxonomy to the card, along with categories.

    #15826
    Andrew
    Participant

    ?

    #15852
    Tom
    Keymaster

    As of right now it’s only possible to display the terms from the chosen taxonomy by default.

    To get lists from other taxonomies, you would need to hook into the post lists and use get_the_term_list() to output the terms.

    For example:

    add_action( 'wpsp_after_content', function() {
        $custom_terms = get_the_term_list( get_the_ID(), 'my-custom-taxonomy' );
    
        if ( $custom_terms ) {
            echo $custom_terms;
        }
    } );
Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.