WordPress.org

Ready to get started?Download WordPress

Forums

twenty fourteen style sheet (9 posts)

  1. Shanatsha
    Member
    Posted 4 months ago #

    I noticed in the twenty fourteen theme header.php doesn't load a style sheet. any reason why? or where does this theme load the style sheet. Thanks in advance.

    http://pastebin.com/NwShR7dp

  2. Riccardo
    Member
    Posted 4 months ago #

    Hey Shanatsha, it's because it's loaded in the functions.php file.

  3. Shanatsha
    Member
    Posted 4 months ago #

    Thanks rick_vIT for the clarification.

    Something else I noticed, I am new to wordpress theme development and very much not a hardcore coder.

    I understand that these lines are addressing internet explore compatibility issues. However, why is there a if statement in a comment? <!--[if IE 7]> and does it actually take effect considering it is in a comment?

    <!--[if IE 7]>
    <html class="ie ie7" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if IE 8]>
    <html class="ie ie8" <?php language_attributes(); ?>>
    <![endif]-->
    <!--[if !(IE 7) | !(IE 8) ]><!-->
    <html <?php language_attributes(); ?>>
    <!--<![endif]-->

  4. wphigh
    Member
    Posted 4 months ago #

    <!--[if IE 7]>...<![endif]-->is a conditional statement only support IE 9-.
    see http://en.wikipedia.org/wiki/Conditional_comment

  5. Shanatsha
    Member
    Posted 4 months ago #

    Thanks wphigh.

    Just want to make sure I fully understand what's going on in the template, after comparing different themes and not all of them seem to use the JavaScript conditional comment.

    I checked the function.php for the style.css and style.css is not mention anywhere in that file, however, there is a style.css file in the theme folder.

  6. wphigh
    Member
    Posted 4 months ago #

    this is not required. It is just add different class at different IE version. then you can fix IE bug via class.
    For instance:
    .ie7 .post { ... } will only affect ie7
    see twentyfourteen\css\ie.css

  7. Shanatsha
    Member
    Posted 4 months ago #

    Not referring to stylesheet for ie fix, I was referring to the general style.css in the theme folder that style the theme, rickVIT mentioned earlier it was in function.php, but I check and I don't see it loading anywhere there.

    The theme is styled some way some how, but which stylesheet is doing the styling?

  8. wphigh
    Member
    Posted 4 months ago #

    example:
    wp_enqueue_style( 'style', get_stylesheet_uri() );
    But I suggest you should study basic knowledge first, such as html, css, PHP, javascript if you want to become a WordPress developer. You can't design a good theme or plugin without basic.

  9. Shanatsha
    Member
    Posted 4 months ago #

    Well I am not pro in any of the above language, but somewhat know the basics. I am a fast learner and willing to give it a shot.

    The thing is, wordpress pretty much has biult in functions that are called, its more so getting around to these functions knowing which calls what. Knowing what wordpress is doing when and where.

    For instance, I thought the stylesheet would have been called in the header.php file using the link rel, but based on what you are saying it was called using

    wp_enqueue_style( 'style', get_stylesheet_uri() );

    It may take some time to get the hang of it, but I will. I was not aware of the conditional comments, so that was new to me, but I get it now.

    I will continue to go through the structure of diff themes and analyse the different structure and function usage.

    Thanks a lot for your help wphigh, I am sure I will have more questions from time to time if I don't find the answer on the support page.

Reply

You must log in to post.

About this Topic