Change background of text based on post category

Hi folks, hope you are all well. Im just wondering if its possible to change the background colour of some text within the posts element based to the colour assigned to that post category. For example, if my text in the post element pulls the term using dynamic content of: {{dc:term:name}}, i want the background colour of that text to be the same as what is assigned to the post category. Hope this makes sense.

Screenshot here to show you the category text that i have set the background to purple for now:

Thanks all

Chris

Hello Chris,

Thanks for posting in! How did you use assign the color of the post category? Is it through a setting or with custom CSS? If the color is defined in the post meta, or somewhere, you should be able to accomplish what you have in mind. To better assist you with your issue, please let us have a clear idea with your page element settings particularly on the color of the post category to give you a tailored solution to your request. If we can log in to your site, we would be happy to investigate. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.