Skip to main content
Fixed minor typos and added formatting
Source Link
Adam
  • 16.5k
  • 1
  • 44
  • 62

I've just started to use WordPress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up. Something

Something tells me it's coming from my functions.php since I've only enqueued one style.css when I have three.

The other two CSS files only have a few lines of code. I can put them on the style.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

I've just started to use WordPress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up. Something tells me it's coming from my functions.php since I've only enqueued one style.css when I have three.

The other two CSS files only have a few lines of code. I can put them on the style.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

I've just started to use WordPress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up.

Something tells me it's coming from my functions.php since I've only enqueued one style.css when I have three.

The other two CSS files only have a few lines of code. I can put them on the style.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

Enqueue more than 2 csstwo CSS styles in a child theme functions.php

I've just started to use wordpressWordPress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up. Something tells me it's coming from my functions.phpfunctions.php since I've only enqueued one style.cssstyle.css when I have three.

The other two cssCSS files only hashave a few lines of codescode. I can put them on the style.cssstyle.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.phpfunctions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

Enqueue more than 2 css styles in a child theme functions.php

I've just started to use wordpress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up. Something tells me it's coming from my functions.php since I've only enqueued one style.css when I have three.

The other two css files only has a few lines of codes. I can put them on the style.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

Enqueue more than two CSS styles in a child theme functions.php

I've just started to use WordPress and learned about the child-theme feature. So it's my first time doing this and I ran into some problems.

When I try to preview the child-theme, the formatting of the whole site is messed up. Something tells me it's coming from my functions.php since I've only enqueued one style.css when I have three.

The other two CSS files only have a few lines of code. I can put them on the style.css but I don't want to modify the original file that's why I'm using a child-theme feature. I'm also here to learn more about this stuff for future reference :)

Here's the contents of my functions.php

add_action( 'wp_enqueue_scripts', 'theme_enqueue_styles' );
function theme_enqueue_styles() {
wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );

Please enlighten me.

edited tags
Link
Source Link
Loading