skip to Main Content

I have description in all the categories page in my wordpress blog. I want to disable the listing of posts in the category page. I tried using css,

 .inside-article{
 display:none;
 }

But this hides content inside all pages and posts.
I want only the post listing to be gone in category, and not even in tags.

2

Answers


  1. Chosen as BEST ANSWER

    Ok, I figured this out in css., Although I would suggest the answer by Zoli, that content should be removed for real. This is the code I tried in CSS

    .category .inside-article { display:none; }
    

  2. When you don’t want content in a page at all, hiding it via CSS is not the desired solution. Instead, this content should be removed "for real" directly from the applicable template file.

    Here’s a description of WordPress’ template hierarchy: https://developer.wordpress.org/themes/basics/template-hierarchy/. Most probably you should edit the category.php file. If it does not exist, you can create one by cloning the archive.php file, which should be there in most cases.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search