Community Forums › Forums › Archived Forums › Design Tips and Tricks › Styling links associated with each post category in the Filed Under Section
Tagged: categories, tags
- This topic has 3 replies, 2 voices, and was last updated 12 years, 11 months ago by
westerdaled.
-
AuthorPosts
-
August 21, 2013 at 7:52 am #57904
westerdaled
MemberHi
Once thing I noticed in some blogs, is the ability to apply styles to links associated with each category ( or even tag ) in the Filed Under section? Currently, it is a bit boring and doesn't really emphasise the topic I am writing about.
As discussed with Jenifer in support, I would need to define.category {}class for each of my 1..10 categories. The tags could have single class to keep things simple. I just wondered if this is easy to do - with a bit of guidance, I wouldn't mind having a go at this myself and posting the output here.August 21, 2013 at 10:12 pm #58118sanjeev
ParticipantUsually they are targeted by CSS class categories and tags...so if you want one styling for all your category.....you can change that css and it should work....
If you want different styles for each category then it might need some code to back it up....but I like the idea of changing that....will check on it and post back as soon as I have something....
Which version of genesis you are working with...2.0?
August 22, 2013 at 2:28 am #58141westerdaled
MemberSanjey
THanks for your reply... I had a look in my theme (Metro/Genesis 2.0) styles and yes, I guess I can embellish this markup - I am assuming I don't need to touch functions.php
.categories, .tags { display: block; }I will be interested in seeing what you come up with. I think the starting point is displaying in the top or bottom of posts. However, It would be cool to also show it in the rolled up content shown the Genesis Featured Posts plugin as this will draw my readers in.
Daniel
October 5, 2013 at 5:32 pm #65498westerdaled
MemberI have to admit I have done much on this as I was told it will be quite complicated. I know I could so this with JQuery but since it would be good keep everything within php and CSS, there must be another way.
Anyway, I stumbled on this link.
If add
< ?php post_class(); ? >to thePost Layouts -> settings ->Custom Post Class
Then I gather....
.cattegory_name to is added my output and if I style these classes then maybe I can cascade the existing metro stylesSo for example if I has a blog on music styles I might have
.category-punk { font: black;} .category-metal {font: red;}and if hack my styles.css I wonder if I can't change the boring post info categories:
.category-punk .entry-categories
{}The plan is to style the the category name in my post or even replace it with an img
I am not sure of the syntax or even the theory so please feel free to correct me.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.