Site logo

Archived topic

Using Content Template for a single custom post type

5 replies · Started by Rekindle on June 13, 2021

Viewing posts 1–6 of 6

Hi,

We have a custom post type called Lessons that is automatically generated by LearnDash. To style these lessons, I used the Block Element - Content Template. It was very helpful for styling the heading, sub-heading, text width, etc.

But the actual content of the lesson itself is now in a dynamic content block. There are section headings, lists, forms, elements I need to hide using CSS, etc within this dynamic content block. I've currently done this using custom CSS that I hooked using the Hook Element to run only on lessons. It's working fine, but I'm not sure if my setup uses GeneratePress fully.

Do you have a way in GeneratePress/ GenerateBlocks by which I don't have to write CSS? Can I use the GP customizer interface or GB blocks to avoid doing this?

Thanks!

Hi there,

Can you link us to a sample page in question? and perhaps point us to the part of the content you're aiming to style.

So we can identify which content can be styled through GP Customizer settings and which ones are styled within GenerateBlocks UI settings.

Let us know. :)

Hi Elvin, please see links and login info below.

I've given you temporary admin access, so you can take a look at the Block Element called Lesson: block and the Simple CSS at the bottom of that page to see what I've done.

Thanks!

Ah, I see now. Thanks.

This is actually the way to go for this one.

Learndash has its own CSS so the best way to override its default CSS is by writing a custom one.

The contents you want to hide are very specific to Learndash and I don't think the plugin has a modular approach where it lets users toggle the visibility of its contents so you really have to write CSS for this.

Thanks Elvin.

No problem. Glad to be of any help. :D

This archived topic is closed to new replies.