Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #889650

    Hi guys,

    I’d like to add custom CSS classes to different post categories so I can customize each one of them one by one. I am talking about the minor meta here that shows below each post’s image. I’ll have around 3-4 categories that need to have custom CSS added to it.

    See this screenshot below so you can get an idea what I’m talking about;

    Custom CSS for minor meta categories

    How could I achieve this?

    Many thanks in advance,
    – Mark

    #889687

    Hey paperdog2,
    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Mike

    #889709

    Thank you for the quick response Mike!
    I really appreciate it, although I would need the exact same thing as this one, but that code doesn’t really seem to be working for me;

    Enfold Different Styles of Categories

    Is there any way you guys could assist me with this?

    Many thanks,
    – Mark

    • This reply was modified 6 years, 7 months ago by paperdog2.
    #889722

    Hi,
    The code didn’t work for me ether, but I will ask Ismael to take a look.

    Best regards,
    Mike

    #889878

    Hey!

    Please provide the url to the site so that we can inspect it

    Regards,
    Ismael

    #889965
    This reply has been marked as private.
    #890244

    Hi Mark,

    Using a JavaScript solution is not a good option here, you should make changes in the templates or try something like this

    
    .blog-categories.minor-meta a:nth-child(n) {
      background-color: red;
    }
    .blog-categories.minor-meta a:nth-child(2n+1) {
      background-color: blue;
    }
    .blog-categories.minor-meta a:nth-child(3n+1) {
      background-color: green;
    }
    

    Best regards,
    Victoria

    #890410
    This reply has been marked as private.
    #890786

    Hi Mark,

    If this is a category page, you should be looking at archive.php and look where categories are rendered.

    Best regards,
    Victoria

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.