how to remove btn-mini (category, tag, etc.) (7 posts)

  1. ChrisFo
    Posted 1 year ago #

    I did find everything I want to child customize this fantastic theme (as a beginner) with the amazing snippets. I would however point to one strong style element which AFAIK is not easy to customize: mini buttons like for a category or tag.

    <a class="btn btn-mini" href="/category/name/" title="...
    <a class="btn btn-mini btn-tag" href="...

    If I like to remove every styling introduced by this classes this is not easy to reset by CSS IMHO. As "weak-PHP-coder" I would appreciate an easy and clean solution for the child functions.php as doing it in all .php with btn classes seems not a good solution.
    Thank you so much.

    EDIT: I have found the two places where I mainly like to remove the btn classes:
    function tc_category_list()
    function tc_tag_list()
    Would still appreciate if a solution over functions.php is more clean and how to do it.

  2. rdellconsulting
    Posted 1 year ago #

    I'm not a php expert either, but I think this will remove the buttons as you've requested:

    //Remove meta-tags
    add_filter('tc_category_list', 'rdc_category_list');
    function rdc_category_list($output) {
    return preg_replace('"btn btn-mini"', '""', $output);
    add_filter('tc_tag_list', 'rdc_tag_list');
    function rdc_tag_list($output) {
    return preg_replace('"btn btn-mini btn-tag"', '""', $output);

    Add to your child theme functions.php

  3. ChrisFo
    Posted 1 year ago #

    Thank you rdellconsulting! It works for me. This is indeed more clean and suggestable then copying and editing single php files in the child folder. Maybe I'm able to use this also in other places now ;-)
    I hope this will be added to Snippets and monitored by the author for future functionality.

  4. rdellconsulting
    Posted 1 year ago #

    I'll certainly add it to the Snippets now I know it works!

  5. ChrisFo
    Posted 1 year ago #

    Thanks for that. Very good that you contribute it to Snippets. Maybe after some time (logging) the most used snippets could be integrated in to the theme options (Customiz'it).

  6. rdellconsulting
    Posted 1 year ago #

    @nikeo is aware of that, thanks

  7. ChrisFo
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic