Skip Navigation

[Resuelto] How do I add custom class or id to a Content Template?

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

How to add custom class or ID to the content template.

Solution:

If you are using blocks editor, you can try Toolset container block, see our document:

Relevant Documentation:

https://toolset.com/course-lesson/container-blocks/

This support ticket is created hace 1 año, 3 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 2 respuestas, has 2 mensajes.

Last updated by marcusC-4 hace 1 año, 3 meses.

Assigned support staff: Luo Yang.

Autor
Mensajes
#2146273

I am displaying a content template within a View loop. The template displays as expected, but I don't see any way to add a custom class or ID to the content template. I need that in order to customize the styling.

You can see the content template within the loop on this page. The posts that are "Sermons" are using the content template: hidden link

#2146485

Luo Yang
Supporter

Languages: Inglés (English ) Chino simplificado (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Hello,

The Toolset content template does not apply any CSS class or ID, you can setup them into the content template, for example:
If you are using classic editor, you can use a HTML div tag to wrap all other content, like this:

<div class="xxx">...</div>

If you are using blocks editor, you can try Toolset container block, see our document:
https://toolset.com/course-lesson/container-blocks/

#2146655

Easy! This is my first foray with the Toolset Blocks and I didn't know yet about the Container Block. I'm loving the new block editor. I also didn't realize that I could switch back to Classic Editor and use the old way of doing things if needed.

Thanks for the insights and info.