cedcommerce on "How to remove categories and tags from post metadata"

ساخت وبلاگ

countrymiles
Member
Posted 3 days ago #

Hello everyone!

I've been trawling the forums but not found anything that helps me with this particular problem, or else found solutions that I can't seem to apply with the theme I'm using (I'm using a child theme with the parent theme 'Snaps').

I'm trying to find a way to remove both the categories and tags from the post metadata, which at the moment is displayed in a block below the post header (see http://www.countrymiles.net/jomblang-cave-and-the-heavenly-light/ for example).

Please forgive any silly questions, I've just moved over from wordpress.com and I'm trying to get my head round everything! So far I've been editing my child theme using appearance>editor and editing the style.css - hopefully this is the correct thing to do!

Editing the CSS is the right idea! One problem is that all of your post metadata is wrapped in the same CSS class ('entry-meta') so it's harder to target the specific sections you'd like to hide.

Here, I'm hiding the specific entry-meta sections by their position—so in this case, the second and third pieces of entry meta.

Hide categories:

.entry-meta:nth-of-type(2) { display: none;
}

Hide tags:

.entry-meta:nth-of-type(3) { display: none;
}

Hi countrymiles,

Category and Tag is coming there because it is coded in your page.php file.
If you want to remove them complete go can check your page.php if present in child theme, otherwise check your parent theme.
You have to comment the code responsible for rendering category and tag.Its the actual solution to solve your issue.
Otherwise you can use the CSS to hide it. It will also solve your purpose.

Thanks

WordPress ...
ما را در سایت WordPress دنبال می کنید

برچسب : نویسنده : استخدام کار wpss بازدید : 272 تاريخ : دوشنبه 7 تير 1395 ساعت: 12:10