We're merging with GenerateBlocks! Learn more here.

[Resolved] Add class to wp-show-posts-single

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Add class to wp-show-posts-single

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #6701
    Paul
    Participant

    Hi Tom

    Do you have a hook or snippet that allows me to add classes to wp-show-posts-single?
    I need to add a couple of animation classes to my posts columns.

    Thanks,
    Paul

    #6722
    Tom
    Keymaster

    Should definitely be possible.

    Try this:

    add_filter( 'wpsp_settings', function( $settings ) {
        if ( 123 === $settings['list_id'] ) {
            $settings['inner_wrapper_class'][] = 'custom-class';
        }
    
        return $settings;
    } );

    You’ll need to change 123 to the list ID you’re targeting.

    #6727
    Paul
    Participant

    Perfect, thank you, Tom!

    #6739
    Tom
    Keymaster

    You’re welcome 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.