• Hello is it possible to hide the author from posts of a specific category and subcategories?

    e.g. I want to hide the author from posts in the Vehicle category and Bike and Car subcategories.

    Animal
    -Cat
    -Dog

    Vehicle
    -Bike
    -Car

    I can imagine I would need to edit it in css with something along the lines of:
    .category-id-123 .author, .category-id-456 .author {display: none;}

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hey,
    The css would only work for the category it’s in. so for vehicle and bike it would be:

    .category-vehicle .postauthortop, .category-bike .postauthortop {
    display: none;
    }

    Kadence Themes

    Thread Starter yandoos

    (@yandoos)

    Thank you for the reply.

    This is not a very workable solution for me as there will be new subcategories added on a regular basis.

    What about if we make it so the author is hidden on all posts that are created by admin? Or is the user type is subscriber then hide?

    How would that work please?

    Thank you

    WordPress doesn’t create a class that has author info. So similar to subcategories, that wouldn’t work.

    As long as all your subcategories is also the vehicle category it would work, you can have more then one category.

    Kadence Themes

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Hide author post from specific category’ is closed to new replies.