[Resolved] How to Show Tags at Masonry Column?

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support How to Show Tags at Masonry Column?

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  Tom 3 months, 3 weeks ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #6302

    Feri
    Participant

    Hi There,

    I have a WPSP with 2 column (masonry), content excerpt and i want to add tags under the excerpt content. is it possible?

    something like this: https://imgur.com/a/77i9qct

    thanks…

    #6309

    Tom
    Keymaster

    Hi there,

    You could do something like this:

    add_action( 'wpsp_after_content', function( $settings ) {
        if ( 10 === $settings['list_id'] ) {
            $tags = get_the_tag_list(' | ',', ');
    
            if ( $tags ) {
                echo '<div class="wpsp-custom-meta">' . $tags . '</div>';
            }
        }
    } );

    Just update the 10 value to the ID of your WPSP list you’re targeting.

    Let me know if you need more info 🙂

    #6310

    Feri
    Participant

    perfect! thank you so much, Tom.

    #6312

    Feri
    Participant
    add_action( 'wpsp_after_content', function( $settings ) {
        if ( 23793 === $settings['list_id'] ) {
            $tags = get_the_tag_list(' Tags: ',', ');
    
            if ( $tags ) {
                echo '<div class="wp-show-posts-entry-meta">' . $tags . '</div>';
            }
        }
    } );

    change div class to wp-show-posts-entry-meta but the result is different with entry meta date. i want to make tags link/text color/hover same as entry meta date. Font size is good except the color active link/hover.

    link blog already sent via contact form.

    thanks

    #6314

    Feri
    Participant

    i think i found the solution, but i dont know if this code is true or false but the result is ok

    .wp-show-posts-tags {
    font-size: .8em;
    }
    
    .wp-show-posts-tags a {
    color: #999999;
    }
    
    .wp-show-posts-tags a:hover { 
    color: #3a3a3a;
    }

    the next question is: i have a lot of post with more than 10 tags. how to limit and display random tags for maximum 10 tags? i need to display any 10 tags randomly. And if possible add some … after the last tags? something like excerpt post?

    #6315

    Tom
    Keymaster

    Hmm, I just looked through the WP function and I can’t see a way to limit the number of tags returned, unfortunately. There isn’t an available filter that I can see.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.