Last active
March 7, 2019 02:31
-
-
Save cobaltapps/6214475 to your computer and use it in GitHub Desktop.
Use this code if you'd like to use an external Custom Stylesheet in Dynamik Website Builder. Note that this code assumes you have created a my-custom.css file and uploaded it to your /wp-content/uploads/dynamik-gen/theme/ directory.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action( 'wp_enqueue_scripts', 'custom_add_stylesheet' ); | |
/** | |
* Enqueue an external Custom Stylesheet to Dynamik Website Builder | |
*/ | |
function custom_add_stylesheet() | |
{ | |
wp_enqueue_style( 'my-custom', dynamik_get_stylesheet_location( 'url' ) . 'my-custom.css', false, filemtime( dynamik_get_stylesheet_location( 'path' ) . 'my-custom.css' ) ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
So, I've followed these instructions on a staging site. I'm trying to alter the widths and floats of .site-inner and .content-sidebar-wrap to try and allow for the visual composer full-width rows to extend to the edges but keep the content in the original width. However, upon inspection after applying your above function.php code through the dynamic admin with my custom css, it doesn't even seem to be even loading file. The original styles are the same and I don't even see my stuff from my custom file as being overridden.
It seems as if this is not actually enqueuing the styles, which makes me think this is not actually working. I've double checked my css file name, location etc and it should be working:
This is in the 'functions' area of the Dynamic control panel:
And this is in the mhi-custom.css in the /wp-content/uploads/dynamik-gen/theme directory
I'm not even sure if those are the appropriate css style edits I want to make overall, but my goal is to get the visual composer full-width rows to stretch and leave the content in the normal full-width area. This works with the genesis paralax pro child theme using your extender plugin, but not with Dynamic. As such I'm trying to altar the Dynamik css like I normally would.
Any suggestions would be most welcome.
Thanks,
Isaac