Removing post date from certain posts

General questions pertaining to how certain issues can be resolved. This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.
Forum rules
This forum is closed with effect from February 2019. Please post future requests on https://github.com/sayontan/suffusion.

1. No offensive language and no mocking
2. Please do a thorough search before you post something. Trust us, there is a high probability that the question you are asking has been asked previously.
3. No soliciting. You cannot post here soliciting bids for people offer you quotes, or even offer money to people for some work. You will be moderated if you do so. If you are looking for help, please post your request on http://jobs.wordpress.net or http://codepoet.com
4. Please be reasonable. You are getting software and support. For free. Complicated requests from a general purpose theme are not welcome and some volunteers might lose patience with you.
5. Please do your due diligence. If you posted a query and we answered with a link, take the trouble to go through the link contents.
6. Please post with complete information. Requests for help MUST be accompanied with your URL, particularly if you are asking something like "Why am I seeing a blank space?"
Locked
irncru
Posts: 22
Joined: 19 Dec 2013, 06:20

Removing post date from certain posts

Post by irncru » 05 Mar 2014, 07:20

Hi,

I'm trying to remove the post date from only certain posts on my site. Specifically all posts that are in one category. I've read up on it and I think I can do this by creating a php file called category-ID, copying the content from category.php and changing something within it to remove the date line, but what I need to change / add / remove is where I get stuck. Can anyone help?
If not, can anyone give me another way of achieving what I'm trying to do?

Thank you

drake
Posts: 6223
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania
Contact:

Re: Removing post date from certain posts

Post by drake » 05 Mar 2014, 20:05

Single posts from one category get the class "category-XXX-id" and the category page itself is enclosed in the class "category-XXX" (where XXX is the WordPress ID of category). So is easy to restrict the displaying of any element to that specific category only by CSS without editing any file.

But I can't tell exactly which element need to be hided because the date is wrapped in different span's or div's depending by your bylines configuration. So, if you don't respect the rule no. 6 of the forum we can't help you more with this.

irncru
Posts: 22
Joined: 19 Dec 2013, 06:20

Re: Removing post date from certain posts

Post by irncru » 07 Mar 2014, 06:20

Pardon me, here's the page posts where I want to remove the dates

http://1070009035.test.prositehosting.co.uk/other-crap/

drake
Posts: 6223
Joined: 26 Jul 2011, 07:56
Location: Constanta, Romania
Contact:

Re: Removing post date from certain posts

Post by drake » 08 Mar 2014, 00:18

So, if you want the date hided only for that specific category page can add at Suffusion Options -> Backend -> Custom Includes -> Custom Styles:

Code: Select all

.category-6 .date {display:none;}
.category-6 .title-container {padding-left:0;}
But if you want to hide the date for all posts from that category, either if they are on category page, or they are on single post pages, then use:

Code: Select all

.category-6-id .date {display:none;}
.category-6-id .title-container {padding-left:0;}

irncru
Posts: 22
Joined: 19 Dec 2013, 06:20

Re: Removing post date from certain posts

Post by irncru » 13 Mar 2014, 04:29

worked perfect! thank you very much

Locked