• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

paula1

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password
  • Profile
  • Topics Started
  • Replies Created
  • Engagements
  • Favorites

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • May 10, 2016 at 12:02 am in reply to: Assigns each category link color from post meta. #185335
    paula1
    Member

    Yes, Brad. It works like in your reply. nth-child selector handles well to add different colors for category links.

    As an example above -

    Category 2 = Orange
    Category 5 = Blue
    ...
    ...
    ... etc.

    But if the post is under category 1 and category 3, those two category links will go with same colors -

    Category 1 = Orange
    Category 3 = Blue

    So, nth-child selector - it doesn't help to assign specific color for each category link.

    But, I really like your solution. Just using CSS to achieve it.

    May 9, 2016 at 11:15 pm in reply to: Assigns each category link color from post meta. #185333
    paula1
    Member

    Would it be possible to add category slug in $output span?

    
    $output = sprintf( '<span %s>', genesis_attr( 'entry-categories' ) ) . $atts['before'] . $cats . $atts['after'] . '</span>';
    
    May 9, 2016 at 11:03 pm in reply to: Assigns each category link color from post meta. #185332
    paula1
    Member

    That's really neat solution. I did try and it works. Fantastic.

    But, sadly, that won't help to assign specific color for each category link.

    May 9, 2016 at 9:48 pm in reply to: Assigns each category link color from post meta. #185329
    paula1
    Member

    Thanks for quick reply. I do appreciate it braddalton.

    Yes. I really want to display different color for each category link at post meta.

    I've 4-5 categories in my blog.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble