WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Template Not Recognizing Stylesheet (2 posts)

  1. m1xfit
    Member
    Posted 1 year ago #

    /////////////////////////////////////////
    DIRECTORY STRUCTURE:
    /////////////////////////////////////////
    _____________________________________________________________________
    /wordpress/
    _____________________________________________________________________

    /bootstrap/
    - /css/
    bootstrap-responsive.css
    bootstrap.css
    - /img/
    glyphicons-halflings.png
    - /js/
    bootstrap.js
    _____________________________________________________________________

    footer.php
    header.php
    index.php
    screenshot.png
    style.css

    _____________________________________________________________________

    /////////////////////////////////////////
    MY PROBLEM:
    /////////////////////////////////////////
    My stylesheet are not showing up but are still referencing the correct location of the files.

    index.php

    <?php get_header(); ?>
    
        <div class="container">
    
          <!-- Main hero unit for a primary marketing message or call to action -->
          <div class="hero-unit">
            <h1>Hello, world!</h1>
            <p>This is a template for a simple marketing or informational website. It includes a large callout called the hero unit and three supporting pieces of content. Use it as a starting point to create something more unique.</p>
            <p><a href="#" class="btn btn-primary btn-large">Learn more &raquo;</a></p>
          </div>
    
          <!-- Example row of columns -->
          <div class="row">
            <div class="span4">
              <h2>Heading</h2>
              <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
              <p><a class="btn" href="#">View details &raquo;</a></p>
            </div>
            <div class="span4">
              <h2>Heading</h2>
              <p>Donec id elit non mi porta gravida at eget metus. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Etiam porta sem malesuada magna mollis euismod. Donec sed odio dui. </p>
              <p><a class="btn" href="#">View details &raquo;</a></p>
           </div>
            <div class="span4">
              <h2>Heading</h2>
              <p>Donec sed odio dui. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Vestibulum id ligula porta felis euismod semper. Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus.</p>
              <p><a class="btn" href="#">View details &raquo;</a></p>
            </div>
          </div>
    
          <?php get_footer(); ?>
      </body>
    </html>

    header.php

    <!DOCTYPE html>
    <html lang="en">
      <head>
        <meta charset="utf-8">
        <title>Bootstrap, from Twitter</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <meta name="description" content="">
        <meta name="author" content="">
    
        <!-- Le styles -->
    	<link href="<?php get_stylesheet_uri() ?>" rel="stylesheet">
    
        <!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
        <!--[if lt IE 9]>
          <script src="../assets/js/html5shiv.js"></script>
        <![endif]-->
    
        <!-- Fav and touch icons -->
        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="../assets/ico/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="../assets/ico/apple-touch-icon-114-precomposed.png">
          <link rel="apple-touch-icon-precomposed" sizes="72x72" href="../assets/ico/apple-touch-icon-72-precomposed.png">
                        <link rel="apple-touch-icon-precomposed" href="../assets/ico/apple-touch-icon-57-precomposed.png">
                                       <link rel="shortcut icon" href="../assets/ico/favicon.png">
      </head>
    
      <body>
    
        <div class="navbar navbar-inverse navbar-fixed-top">
          <div class="navbar-inner">
            <div class="container">
              <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
              </button>
              <a class="brand" href="#">Project name</a>
              <div class="nav-collapse collapse">
                <ul class="nav">
                  <li class="active"><a href="#">Home</a></li>
                  <li><a href="#about">About</a></li>
                  <li><a href="#contact">Contact</a></li>
                  <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">Dropdown <b class="caret"></b></a>
                    <ul class="dropdown-menu">
                      <li><a href="#">Action</a></li>
                      <li><a href="#">Another action</a></li>
                      <li><a href="#">Something else here</a></li>
                      <li class="divider"></li>
                      <li class="nav-header">Nav header</li>
                      <li><a href="#">Separated link</a></li>
                      <li><a href="#">One more separated link</a></li>
                    </ul>
                  </li>
                </ul>
                <form class="navbar-form pull-right">
                  <input class="span2" type="text" placeholder="Email">
                  <input class="span2" type="password" placeholder="Password">
                  <button type="submit" class="btn">Sign in</button>
                </form>
              </div><!--/.nav-collapse -->
            </div>
          </div>
        </div>


    style.css

    /*
    	Theme Name: BootPress
    	Theme URI: http://www.something.me
    	Description: WordPress Template Developed for R.A.D
    	Author: m1xfit
    	Author URI: http://www.something.me
    	Version: 1.0
    */
    
    @import url("bootstrap/css/bootstrap.css");
    @import url("bootstrap/css/bootstrap-responsive.css");
    
     body
     {
        padding-top: 60px;
        padding-bottom: 40px;
     }
  2. alchymyth
    Forum Moderator
    Posted 1 year ago #

    try:

    <link href="<?php echo get_stylesheet_uri(); ?>" rel="stylesheet">

    http://codex.wordpress.org/Function_Reference/get_stylesheet_uri#Examples

    and possibly (untested):

    @import url("../bootstrap/css/bootstrap.css");
    @import url("../bootstrap/css/bootstrap-responsive.css");

Topic Closed

This topic has been closed to new replies.

About this Topic