My own theme does not work – please help!
-
Hello,
I am trying to make my own wordpress theme. The strange thing is that when I activate my theme in wordpress, it does not show anything when i visit the site. Really nothing! The page is just white, and when I show the source code is all blank – NOTHING!?
I run WordPress 3.8 on a local MAMP PRO web server on my MAC.
Here is all my files:
style.css:
/* Theme Name: Stine Theme URI: http://www.url.com/ Description: Author: Ian Myhre Author URI: http://www.url.com/ Version: 1.0 Tags: License: License URI: General comments: */ /** * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/) * http://cssreset.com */ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; } /* HTML5 display-role reset for older browsers */ article, aside, details, figcaption, figure, footer, header, hgroup, menu, nav, section { display: block; } body { line-height: 1; } ol, ul { list-style: none; } blockquote, q { quotes: none; } blockquote:before, blockquote:after, q:before, q:after { content: ''; content: none; } table { border-collapse: collapse; border-spacing: 0; } /* Structure */ body { background: silver; font: 16 px arial, sans-serif; } #container { background: #fff; border-radius: 14px; overflow: auto; } #container, header, nav, footer { width: 800px; padding: 20; margin: 0 auto; } footer { background: #000; color: #fff; } #left { float: left; width: 590px; border: 1px solid green; } #sidebar { border: 1px solid red; float: right; width: 200px; } nav ul li { display: inline-block; } nav ul li a { padding: 10px 20px; } /* Text Rules */ h1 { font-size: 26px; } h2 { font-size: 22px; } h3 { font-size: 18px; }index.php
<?php get_header() ?> <?php get_sidebar() ?> <div id="left"> <?php while(have_posts()): the_post(): ?> <h2><a href="<?php the_permalink() ?>"><?php the_title() ?></a></h2> <p> <?php echo get_author_link(false, $authordata->ID, $authordata->user_nicename); ?> </p> <?php the_content(__('Continue Reading')); ?> <?php endwhile; ?> </div> <?php get_footer() ?>header.php
<!doctype html> <html> <head> <meta charset="utf-8" /> <title><?php bloginfo('title') ?></title> <!--[if IE]><script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <link rel"stylesheet" href"<?php bloginfo('stylesheet_url') ?>" /> <?php wp_head()?> </head> <header> <h1><a href="<?php echo home_url('/') ?>"><?php bloginfo('name') ?></a></h1> </header> <nav> <?php wp_nav_menu(); ?> </nav> <div id="container">footer.php
</div> <footer> <?=date('Y') ?> Copyright </footer> </body> </html>sidebar.php
<div id="sidebar"> <h3>Sidebar</h3> <?php dynamic_sidebar('first-right-sidebar'); ?> <?php dynamic_sidebar('second-right-sidebar'); ?> </div>single.php
<?php get_header() ?> <?php get_sidebar() ?> <div id"left"> <?php while(have_posts()): the_post(): ?> <h2><?php the_title() ?></h2> <?php the_content(); ?> <?php endwhile;?> <?php comments_template('', true); ?> </div> <?php get_footer() ?>page.php
<?php get_header() ?> <?php get_sidebar() ?> <div id="left"> <?php while(have_posts()): the_post(): ?> <h2><?php the_title() ?></h2> <?php the_content(); ?> <?php endwhile; ?> </div> <?php get_footer() ?>comments.php
<div id="comments"> <?php wp_list_comments(); ?> </div> <div id="comment-form"> <?php comment_form(); ?> </div>functions.php
<?php register_sidebar(array( 'name' => __('1st Right Sidebar'), 'id' => 'first-right-sidebar', 'description' => 'The top bar', 'before_widget' => '<div>', 'after_widget' => '</div>' )); register_sidebar(array( 'name' => __('2st Right Sidebar'), 'id' => 'second-right-sidebar', 'description' => 'The second top bar', 'before_widget' => '<div>', 'after_widget' => '</div>' ));As you can see this is just a start on my theme, but the whole process stops since I can`t get it to work. I really hope that some of you can help me fix the bug so I can go forward with building my own wordpress theme!
Thnx guys! 🙂
The topic ‘My own theme does not work – please help!’ is closed to new replies.