Can I Change Post Colors on the Calendar Based on its Categories and Other Criteria?
By default, Nelio Content colors the posts in the calendar and other views (such as the Content Board) based on the status of each post. For instance:
- Draft posts appear in red
- Pending posts are yellow
- Published posts are shown in green
This provides a quick visual reference to help you track your editorial workflow.
However, if you’d like to customize these colors based on other criteria—like post categories—Nelio Content offers a simple and flexible solution using custom CSS. Each post element includes data-* attributes such as data-post-type, data-status, data-taxonomy-category, or data-taxonomy-post_tag (to name a few) which you can use to target and style specific posts.
Example: Coloring Posts by Category
Let’s say you want posts categorized as Interview to appear in blue. Assuming the slug for the “Interview” category is interview, you can add the following CSS to your site:
.nelio-content-colored-post[data-taxonomy-category~="interview"] {
background-color: #abdef7; /* Light blue */
border-top-color: #0073aa; /* Dark blue */
}Code language: CSS (css)This rule targets any post that includes the interview category and changes its background and border color accordingly.
How to Add the CSS in WordPress
To safely load this CSS in your WordPress admin area (so it affects Nelio Content’s calendar), you’ll need to enqueue it using a small PHP snippet. Add the following code to your theme’s functions.php file or via a custom plugin:
add_action(
'admin_enqueue_scripts',
function () {
$style = '
.nelio-content-colored-post[data-taxonomy-category~="interview"] {
background-color: #abdef7; /* Light blue */
border-top-color: #0073aa; /* Dark blue */
}
';
wp_add_inline_style( 'nelio-content-colored-post', $style );
}
);Code language: PHP (php)This will inject the custom styles directly into the admin interface wherever Nelio Content is displayed and these styles are needed.
💡 Tip: You can repeat this approach for any category by replacing
interviewwith the desired category slug and adjusting the color as needed.
If you need help finding the correct slug for a category or want to apply more advanced styling, feel free to reach out to our support team—we’re happy to help!
Did you find this useful?
Thanks for your feedback!
Not what you’re looking for? Ask us directly:


