Content Area element versus Text element

In Pro theme, when is it better to use a content area element versus a text element?

thanks

Hi There,

I prefer the text element, the content area element doesn’t have the advanced settings like the text element:

Regards!

Okay, thanks.

I guess I was more curious about WHY content area element exists in the first place.

For example, does it render iframe type embed codes better? Does it handle embed codes via javascript better?

Howdy, @wbgTHEMECO!

Thanks for writing in and that’s a great question! The purpose of the Content Area Element is to give users a completely blank “access point” anywhere into the builder’s content for you to put something completely custom. The base Content Area Element is literally just a <div> that doesn’t do any filtering of content like the Text Element does for formatting. While you can put text content inside it, it’s really great for:

  • Custom <script> elements that you need to output physically within a page somewhere
  • Using shortcodes within your page
  • Adding in your own completely custom markup that will remain unaffected by any sort of formatting or filtering, which you can later style easily via our integrated editors or a child theme

Those are just a few use cases, but it certainly has it’s purposes and it’s quite different from Text. In short, use the Text Element when you need to output actual text onto your page that you want to format in a very specific way. Use the Content Area Element when you have custom markup or output you need to put directly into your content.

As a final note, the purpose of the Content Area Dropdown, Content Area Off Canvas, and Content Area Modal elements functions much the same. It gives you a “blank” access point into the content areas of these very helpful components that you can completely style as you wish and then display any sort of custom content or functionality within them, effectively making your own Elements off of their base. For example, you might have an email opt-in form from a provider who has given you a script to embed that form on your page. You can take that script and place it directly in your content, or you could put it in a dropdown or modal or off canvas area if those better suit your needs and goals.

Hopefully this helps to shed a little more light on things, cheers!

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