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

Question regarding child theming #79

Closed
qwik3r opened this issue Oct 31, 2012 · 2 comments
Closed

Question regarding child theming #79

qwik3r opened this issue Oct 31, 2012 · 2 comments

Comments

@qwik3r
Copy link

qwik3r commented Oct 31, 2012

I followed instructions here on child theming and adding my own css file, but I'm curious about how I would go about adding that bswp-custom.less file to my child theme so that I don't have to go into the base theme's /less/bswp-custom.less file if i want to add custom css.

@phillipadsmith
Copy link

@qwik3r I've done that by changing the order of the links to the CSS files like so:

function occupy_css_loader() {
    wp_enqueue_style('bootstrapwp', get_template_directory_uri().'/css/bootstrapwp.css', false ,'0.90', 'all' );
    wp_enqueue_style('prettify', get_template_directory_uri().'/js/google-code-prettify/prettify.css', false ,'1.0', 'all' );
    wp_enqueue_style('my-theme', '/wp-content/themes/my-theme/style.css', false ,'0.01', 'all' );
  }
add_action('wp_enqueue_scripts', 'occupy_css_loader');

That is added to the child theme's functions.php.

In this scenario, the child theme's CSS file is loaded last, and therefor can override anything in the boostrapwp.css file.

I find this a better approach, as it lets me keep the bootstrapwp theme updated as a git submodule, and let's me keep my child-theme-specific files in their own directory.

Let me know if that helps at all.

@rachelbaker
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants