Topic: Compatibility with Roots Sage?

bluedigital free asked 5 years ago


The setup is not what I expected at all and it very difficult to find exactly what's needed. I saw a page which provided some code snippets on how to integrate but have since lost it and can't seem to find it again.

It's just not very clear what was provided and how to use it.

Question - Do you know if it's possible to quickly/cleanly integrate this with Roots Sage for Wordpress Bedrock? I know there is a gulp version but I already have all the Roots Sage setup including webpack and such.


Bartłomiej Malanowski staff commented 5 years ago

Currently, we don't support Bedrock. However, I'll leave this question open so maybe someone will know the answer


bluedigital free answered 5 years ago


I only wanted the Gallery for now so this is definitely the worst way to include these but this got me enough to copy the code examples and get stuff running ...

/**
 * Include CSS files
 */
function mdb_enqueue_scripts() {
//    wp_enqueue_style( 'Font_Awesome', 'https://use.fontawesome.com/releases/v5.6.1/css/all.css' );
    wp_enqueue_style( 'Bootstrap_css', get_template_directory_uri() . '/mdb/css/bootstrap.min.css' );
    wp_enqueue_style( 'MDB', get_template_directory_uri() . '/mdb/css/mdb.min.css' );
    wp_enqueue_style( 'Style', get_template_directory_uri() . '/mdb/css/style.css' );
    wp_enqueue_script( 'jQuery', get_template_directory_uri() . '/mdb/js/jquery-3.3.1.min.js', array(), '3.3.1', true );
    wp_enqueue_script( 'Tether', get_template_directory_uri() . '/mdb/js/popper.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'Bootstrap', get_template_directory_uri() . '/mdb/js/bootstrap.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'MDB', get_template_directory_uri() . '/mdb/js/mdb.min.js', array(), '1.0.0', true );
}

add_action( 'wp_enqueue_scripts', 'mdb_enqueue_scripts' );

It would be great if I could have included something via Composer and just started using the 'modules' individually. It's a mess because most of what I'm including is already available to some degree.

I'm also not sure if this ties into the Webpack setup Roots Sage gives me.


Bartłomiej Malanowski staff commented 5 years ago

With MDB you can use only these components that you really need. Please check our customization tutorial: https://mdbootstrap.com/education/bootstrap/customization/


bluedigital free answered 5 years ago


I only wanted the Gallery for now so this is definitely the worst way to include these but this got me enough to copy the code examples and get stuff running ...

/**
 * Include CSS files
 */
function mdb_enqueue_scripts() {
//    wp_enqueue_style( 'Font_Awesome', 'https://use.fontawesome.com/releases/v5.6.1/css/all.css' );
    wp_enqueue_style( 'Bootstrap_css', get_template_directory_uri() . '/mdb/css/bootstrap.min.css' );
    wp_enqueue_style( 'MDB', get_template_directory_uri() . '/mdb/css/mdb.min.css' );
    wp_enqueue_style( 'Style', get_template_directory_uri() . '/mdb/css/style.css' );
    wp_enqueue_script( 'jQuery', get_template_directory_uri() . '/mdb/js/jquery-3.3.1.min.js', array(), '3.3.1', true );
    wp_enqueue_script( 'Tether', get_template_directory_uri() . '/mdb/js/popper.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'Bootstrap', get_template_directory_uri() . '/mdb/js/bootstrap.min.js', array(), '1.0.0', true );
    wp_enqueue_script( 'MDB', get_template_directory_uri() . '/mdb/js/mdb.min.js', array(), '1.0.0', true );
}

add_action( 'wp_enqueue_scripts', 'mdb_enqueue_scripts' );

It would be great if I could have included something via Composer and just started using the 'modules' individually. It's a mess because most of what I'm including is already available to some degree.

I'm also not sure if this ties into the Webpack setup Roots Sage gives me.



Please insert min. 20 characters.

FREE CONSULTATION

Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.

Status

Answered

Specification of the issue

  • ForumUser: Free
  • Premium support: No
  • Technology: General Bootstrap questions
  • MDB Version: -
  • Device: Mac
  • Browser: Chrome
  • OS: Mac
  • Provided sample code: No
  • Provided link: No