Color Mapping Question

Posted in: Newspaper
Post count: 5

Can we change the color of the categories in shortcodes blocks? We can set the category color in the theme settings, however the color only takes its assigned color within a post page, not within the blocks.

is it possible for the categories in the blocks (such as “BIG GRID BLOCK 3”) to use the colors assigned in the theme settings that is being used on a category/post page?

Post count: 20688

Hi,

On block modules the category tag color could only be changed wit CSS code, if that is what you want. The custom colors set in the theme panel for these, will only be displayed in the post page.
You could change the default color with some CSS code by block, like this
https://www.screencast.com/t/0bmgFjkZ

This is the code used in the example

.td_block_big_grid_3 .td-post-category {
background-color: blue;
}

Use the browser inspector to identify the elements on the page and their classes, in order to create custom code
https://forum.tagdiv.com/create-custom-code-using-the-browsers-inspector/

Thanks

Post count: 5

We actually need each category to have a unique color in a block. I currently don’t see any distinction between each category in the inspector to be able to do this. What do you recommend?

Post count: 20688

Hi,

You can use each block type to customize the category tag color as you like, not the actual category name, those are treated the same. This is an example for three different blocks on a page
https://www.screencast.com/t/icai3arR3E
Then color of the tag can be changed by adding it in the code, for each block
https://www.screencast.com/t/Ze1l3dq65
This can be done by module used, some blocks contain multiple module types
https://www.screencast.com/t/C9l5l3dUA6Wl
Here you can see which modules each block contain, based on the layout
https://forum.tagdiv.com/theme-blocks-modules/
If you have multiple blocks of the same type, these can be differentiated by setting an unique class for each of them
https://www.screencast.com/t/1PkqRb4O
This is the code used in the example

.td_block_1 .td-post-category {
background-color: red;
color: yellow;
}

Please let us know if you have further questions.

Thanks

Post count: 5

Sorry, but that is still not what we need. We need to style each category title differently in the same block.

Post count: 5

I see there is a class on the anchor tag within the category I can use, I didn’t notice that before. Thank you.

Viewing 6 posts - 1 through 6 (of 6 total)
The forum ‘Newspaper’ is closed to new topics and replies.