Text padding for cerating categories

Posted in: Newspaper
Post count: 21

Hello,

With TinyMCE it is possible to set text padding which is very useful for full-width template.

We would like to set full-width with text padding (centered) into specific categories.

For example we would like to have articles in category “travel” to be automatically formmated like this: https://www.zaujimavysvet.sk/barcelona-letenky-tipy/ – without sidebar, with centered text padding

For other categories like “news” we would like to have standard format with sidebar .

I understand that it is possible to set full-width template for certaing category which is great but without centered text it is really bad user experience .

Thank you very much.

Peter

Post count: 20688

Hi,

The text padding has to be set manually for each post, when creating the post. That is the case for the sidebar as well, it has to be manually disabled for each post if that is required.
I see that you use the same padding value for the whole post content, you could try a code like this in the theme panel custom CSS section

.category-travel .td-post-content {
padding-left: 12%;
padding-right: 12%;
}

This will set a padding to the post content, for posts that belong to the travel category in this example. Replace the category with your own and see if it works properly in some tests.
For example here I have disabled the paragraph padding, and used the code
https://www.screencast.com/t/cPXdV0Gdgiy

Thanks

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