1

I am creating a child theme for the first time, and sort of learning as I go.

I am having an issue with the way videos are showing up on a mobile phone with my child theme, but not with my parent theme. I'm wondering what is going on.

On my child theme the videos show up large when viewed on a mobile device (http://wpdallas.com/test)

However, in the parent theme the videos show up fine: http://wpdallas.com/plain

In my child them I am importing the following css, do I need to import every CSS file into my child theme, or just the style.css? (I've found conflicting info when learning how to do this.)The parent theme has about 20 different css files. I'm wondering if I need to import them all into my child theme, or if I need to delete the other two below, and just leave the first one (style.css.)

Just trying to figure out why the child theme isn't styling correctly. Thanks.

 @import url("../Standard/style.css");
    @import url("../Standard/standard_framework/css/standard_framework.css"); 
    @import url("../Standard/css/lib/adapt/mobile.css");
6
  • What is the parent theme you're using? It shouldn't be that you need to include 1 for the core, but some theme devs do some weird stuff and so it may be a different situation. Also, you're probably not gonna get many responses with a 25% accept rate, you should go and resolve some of your old questions.
    – mor7ifer
    Feb 27, 2012 at 17:07
  • The parent theme I'm using isn't a public theme, so that wouldn't help you. I can post any of the code in here. Can you tell why the one at /plain shows up fine in a mobile browser, but not the one at /test? Also how do I go and resolve the old questions?
    – Rick Smith
    Feb 27, 2012 at 17:31
  • 1
    In that case, this sounds like a user support question that should be addressed to the theme's developer(s)
    – mor7ifer
    Feb 27, 2012 at 17:35
  • The theme really isn't child theme ready right now. I added some code that allowed it to be child theme ready. I'm just asking in general when making a child theme, do I need to import more than just the style.css? Here is the code from the theme I put into make it use a child theme. // theme wp_register_style('standard', get_stylesheet_directory_uri() . '/style.css'); wp_enqueue_style('standard'); Also how do I resolved a question? I thought I just select the check mark. Is there more to it than that?
    – Rick Smith
    Feb 27, 2012 at 17:43
  • Yep, just select the right answer (or post your own answer if one didn't come and you resolved the issue). I'm not sure what that code is supposed to be...have you read the codex page on child themes?
    – mor7ifer
    Feb 27, 2012 at 18:16

1 Answer 1

1

This question depends entirely on the Theme in question, and how it handles CSS.

  1. For a Theme that uses only a single style.css file, obviously, you only need to import style.css.
  2. For a Theme that links other stylesheets in the document head (they shouldn't be doing this; instead, they should be properly enqueueing them), you'll need to determine whether or not you want to leave those links in header.php, based on whether or not you want to use the styles defined in those stylesheets.
  3. For a Theme that enqueues additional stylesheets, via wp_enqueue_style(), you don't need to do anything. Such stylesheets will continue to be enqueued in the Child Theme. If you don't want those styles, then you need to dequeue those stylesheets, via wp_dequeue_style() in the Child Theme functions.php.
  4. For a Theme that prints styles in the document head, via add_action( 'wp_print_styles', $callback ), you don't need to do anything. Such stylesheets will continue to be printed in the Child Theme. If you don't want those styles, then you need to override the output of those stylesheets, via remove_action( 'wp_print_styles', $callback ) in the Child Theme functions.php.

I think that covers most of the bases.

2
  • is there any way we could do a chat? I want to ask you a few questions about what you talked about here. :) Thanks.
    – Rick Smith
    Mar 1, 2012 at 16:53
  • Sure, I'll try to pop into chat. Mar 1, 2012 at 20:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.