Site logo

Archived topic

Style Tags and Cats

8 replies · Started by breaked on July 4, 2017

Viewing posts 1–9 of 9

Hi there,

Try something like this:

.cat-links a,
.tags-links a,
.comments-link a {
    border: 1px solid #000;
    padding: 3px;
}
.cat-links a:hover,
.tags-links a:hover,
.comments-link a:hover {
    background-color: #666;
}
footer.entry-meta {
    line-height: 2.5;
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Thanks, looks good!
But.. there are commas between each words. Can I delete them?

And I'm able to create a button for writing comments also?

We can use a filter to do that quite easily:

add_filter( 'generate_tag_list_output', 'tu_adjust_tag_list_separator' );
function tu_adjust_tag_list_separator() {
    $tags_list = get_the_tag_list( '', ' ' );

    printf( '<span class="tags-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
        _x( 'Tags', 'Used before tag names.', 'generatepress' ),
        $tags_list
    );
}

add_filter( 'generate_category_list_output', 'tu_adjust_category_list_separator' );
function tu_adjust_category_list_separator() {
    $categories_list = get_the_category_list( ' ' );

    printf( '<span class="cat-links"><span class="screen-reader-text">%1$s </span>%2$s</span>',
        _x( 'Categories', 'Used before category names.', 'generatepress' ),
        $categories_list
    );
}

Great as always!!!
Thanks.

Ah... whats about the button for comments?! It's possible?

Perfect!

Awesome!

This archived topic is closed to new replies.