Support » Theme: Hatch » remove category from post meta

  • lowesmed

    (@lowesmed)


    Thanks for a great theme!

    On the post page there is some meta about which category the post is listed.
    Code:

    <?php echo apply_atomic_shortcode( 'byline_category', '<div class="byline byline-ategory">' . __( 'Category: [entry-terms taxonomy="category"]', 'hatch' ) . '</div>' ); ?>

    How can I exclude categories from this list?

    /Lowe

Viewing 5 replies - 1 through 5 (of 5 total)
  • paulwpxp

    (@paulwp)

    Font hero

    The [entry-terms] shortcode uses get_the_term_list() which doesn’t seem to have the exclude argument. Even if you filter that function, still it’s a lot to do to accomplish this.

    I’d just use CSS attribute selectors to display none categories that I want excluded.
    https://developer.mozilla.org/en-US/docs/Web/CSS/Attribute_selectors

    lowesmed

    (@lowesmed)

    Ok thanks that worked geat!

    How do i get rid of the “,” ?

    paulwpxp

    (@paulwp)

    Font hero

    That’s impossible with CSS.

    You can, with Child Theme in use, replace that whole templage tag (in your OP) with wp_list_categories(), then you an include, exclude, and do more with your own $args

    http://codex.wordpress.org/Template_Tags/wp_list_categories

    @paulwpxp: False.

    Place this somewhere in the “Custom CSS” box in the “Theme Settings” menu:

    .byline.byline-ategory {
    
      display: none !important;
    
    }
    paulwpxp

    (@paulwp)

    Font hero

    That only get rid of the whole thing which is not what we are talking about here. We want to get rid of the , (comma) left after when some category is display none via attribute selectors.

    Or maybe I misunderstood the question. But when I hear “exclude” I automatically think that there is some of them not wanted in the list.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘remove category from post meta’ is closed to new replies.