When I activate my theme in my-admin on WordPress, my CSS, header and the footer don’t show up. I really don't know what the problem is because I followed all the steps of a tutorial.


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" <?php language_attributes(); ?>>
<head profile="http://gmpg.org/xfn/11">
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<?php wp_title('&laquo;', true, 'right'); ?>
<?php bloginfo('name'); ?>
<!-- Main WordPress Stylesheet -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<!-- WYSIWYG CSS -->
<link rel="stylesheet" href="<?php bloginfo('stylesheet_directory'); ?>/css/wysiwyg.css" type="text/css" media="screen" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />

<link href="<? bloginfo('stylesheet_directory'); ?>/css/index.css" type="text/css" rel="stylesheet" />

<?php  wp_head(); ?>
<div class="topBar"></div>

<!-- Begin container -->
<div id="container">
<!-- Begin contact -->
<div class="contactInfo">
    <li>1234 Main Street NE, Suite 201</li>
    <li>Grand Rapids, MI 49503 Main 616 555 5555</li>
<!--/ End contact --> 

<!-- Begin navigation container -->
<div class="navigationContainer"> 

  <!-- Begin logo -->
  <div class="logo"> <a href="index.html"><img src="images/logo.jpg" alt="Megan Sullivan" /></a> </div>
  <!--/ End logo --> 

  <!-- Begin navigation -->
  <div class="navigation">
      <li class="active"><a href="index.html">Home</a></li>
      <li><a href="portfolio.html">Portfolio</a></li>
      <li><a href="about.html">About</a></li>
      <li><a href="contact.html">Contact</a></li>
  <!--/ End navigation --> 

<!--/ End navigation container --> 

<!-- Begin grey separator -->
<div class="greySeparator"></div>
<!--/ End grey separator -->


 <!-- Begin footer -->
    <div class="footer">
        Copyright &copy; 2009, Megan Sullivan. All Rights Reserved.
    <!--/ End footer -->
<!--/ End container -->
<?php wp_footer(); ?>
  • 2
    what template files does your theme have? do they call get_header() and get_footer()? – Milo Feb 26 '13 at 1:21
  • Paste the contents of your index.php file into the question itself. Pastebins are subject to link rot. I suspect that that is where the problem is, and possibly in other files as well. – s_ha_dum Feb 26 '13 at 3:32
  • I suspect you don't have short_open_tag enabled. Replace <? bloginfo('stylesheet_directory'); ?> with <?php bloginfo('stylesheet_directory'); ?>. If this fixes the issue, then that was the problem. – stealthyninja Feb 26 '13 at 6:36

This is how your index.php and other public facing pages should be.. Don't forget to add get_header() and get_footer()

<?php get_header(); ?>

    <!-- Row for main content area -->
    <div id="content">

            <!--  Main Content Loop HERE, or just use while have posts and get the content;..-->
            <?php get_template_part('loop', 'index'); ?>

    </div><!-- End Content row -->

    <?php get_sidebar(); ?>

Learn more here : http://codex.wordpress.org/Function_Reference/get_header http://codex.wordpress.org/Function_Reference/get_footer

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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