remove category from post meta (6 posts)

  1. lowesmed
    Posted 3 years ago #

    Thanks for a great theme!

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

    <?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?


  2. paulwpxp
    Font hero
    Posted 3 years ago #

    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.

  3. lowesmed
    Posted 3 years ago #

    Ok thanks that worked geat!

    How do i get rid of the "," ?

  4. paulwpxp
    Font hero
    Posted 3 years ago #

    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


  5. cloud4xL
    Posted 2 years ago #

    @paulwpxp: False.

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

    .byline.byline-ategory {
      display: none !important;
  6. paulwpxp
    Font hero
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic


No tags yet.