Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

module or layout shortcodes are not rendering properly in VB due to CSS style? #179

Open
mrkenng opened this issue Oct 8, 2018 · 4 comments

Comments

@mrkenng
Copy link

commented Oct 8, 2018

Problem Description

Is there a way to get the module or layout custom css styling? So far as I know, using ET_Builder_Element::get_style() will automatically render and get the styling on the frontend only. What about the VB react part? is there anyway to get it ? I am trying to echo out the module's shortcode on PHP and it is showing up nicely on the frontend however, on the VB, styles are not applied to them. Even using Divi's built in code module with the shortcode doesn't have any css styles on them. Any idea or solution on this ?

Many thanks!

Steps To Reproduce

Screenshot and/or gif

@lots0logs

This comment has been minimized.

Copy link
Member

commented Oct 10, 2018

Unfortunately that isn't possible currently. We'll certainly consider adding an API for it in the future though.

@mrkenng

This comment has been minimized.

Copy link
Author

commented Oct 11, 2018

Thanks! Hopefully to see this soon! Currently using .load method to load the inline styles from the frontend css which is not a good idea but a temporary solution for now.

@wassy83

This comment has been minimized.

Copy link

commented Jan 21, 2019

Thanks! Hopefully to see this soon! Currently using .load method to load the inline styles from the frontend css which is not a good idea but a temporary solution for now.

Hi @mrkenng sorry for reopening this post, I'm trying to do something similar, I'm placing into my single-cpt.php some shortcode to divi section/layouts like this
<?php echo do_shortcode('[et_pb_section global_module="216445"][/et_pb_section]');?>

before and after the entry content. Everything looks fine in frontend but the VB doesn't render the shortcodes(some classes are missing), this is really anooying, can you please write here some lines of your .load() code workaround? this post is really the only documentation I found regarding this
Many thanks

@mrkenng

This comment has been minimized.

Copy link
Author

commented Feb 27, 2019

@wassy83 just realise it doesn't work anymore. The .load code fetches the inline styles css. But unfortunately, it is causing some issue. I've drop that idea. Let's hope the ET team will intro a better solution to load css for shortcodes for Visual Builder soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.