Skip to content

Instantly share code, notes, and snippets.

@AndrewECooper
Created April 4, 2014 08:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AndrewECooper/9970622 to your computer and use it in GitHub Desktop.
Save AndrewECooper/9970622 to your computer and use it in GitHub Desktop.
<?php
define("TEMPPATH", get_bloginfo("stylesheet_directory"));
define("IMAGES", TEMPPATH."/images");
define("SCRIPTS", TEMPPATH."/js");
function custom_navigation_menus() {
$locations = array(
'header-menu' => __( 'Main Navigation'),
);
register_nav_menus( $locations );
}
if (function_exists("register_sidebar")) {
register_sidebar(
array(
"name" => __("Left Sidebar", "sidebar-left"),
"id" => "left-widget-area",
"description" => __("The left widget area", "dir"),
"before_widget" => "<div class=\"widget standard-font\">",
"after_widget" => "</div>",
"before_title" => "<h3 class=\"widget-title\">",
"after_title" => "</h3>"
)
);
register_sidebar(
array(
"name" => __("Right Sidebar", "sidebar-right"),
"id" => "right-widget-area",
"description" => __("The right widget area", "dir"),
"before_widget" => "<div class=\"widget standard-font\">",
"after_widget" => "</div>",
"before_title" => "<h3 class=\"widget-title\">",
"after_title" => "</h3>"
)
);
}
add_action("init", "custom_navigation_menus");
?>
<!DOCTYPE html>
<html>
<head>
<title>
<?php bloginfo("name"); ?> | <?php wp_title(); ?>
</title>
<link rel="stylesheet" type="text/css" href="<?php bloginfo("stylesheet_url"); ?>" />
<link rel="pingback" href="<?php bloginfo("pingback_url"); ?>" />
<script type="text/javascript" src="<?php echo SCRIPTS; ?>/jquery-1.8.js"></script>
<script type="text/javascript" src="<?php echo SCRIPTS; ?>/jquery-ie-text-shadow.js"></script>
<?php //wp_head(); ?>
</head>
<body>
<div id="layout">
<!-- Header Area -->
<div id="header" dock='top' class="viewscreen">
<div id="title-container">
<font class="title-text standard-font">
<?php bloginfo("name"); ?>
</font>
<br>
<font class="subtitle-text standard-font">
A Cyberpunk Wordpress Theme
</font>
</div>
<?php wp_nav_menu(
array(
"theme_location" => "header-menu",
"container" => "div",
"container_class" => "standard-font",
"container_id" => "header-menu",
"items_wrap" => "<ul>%3$s</ul>",
"after" => " | "
)
);
?>
</div>
<!-- Main Area -->
<div id="lower-container">
<?php get_header(); ?>
<?php get_sidebar("left"); ?>
<div id="main-info-container">
<?php get_sidebar("right"); ?>
<div id="main" class="viewscreen">
<?php if (have_posts()): while(have_posts()): the_post(); ?>
<div class="post standard-font">
<hr>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="byline standard-font">source: <?php the_author_posts_link(); ?>; date: <a href="<?php the_permalink(); ?>"><?php the_time("l F d, Y"); ?></a>;</div>
<hr>
<?php the_content("Read more..."); ?>
</div>
<?php endwhile; else: ?>
<p><?php __e("No posts were found. Sorry."); ?></p>
<?php endif; ?>
</div>
</div>
</div>
</div>
<script type="text/javascript">
$(document).ready(function () {
$("#header font.title-text").ieTextShadow();
});
</script>
</body>
</html>
@jocastaneda
Copy link

  1. use get_template_directory() instead of bloginfo
  2. Don't forget to include wp_footer() just before the closing body tag.
  3. remove the function check for register_sidebar
  4. font is an obsolete tag try not to use it. Very few browsers will support it.
  5. If you are going to use translation functions make sure you declare the domain ie: _e( 'Text string', 'text-domain' );
  6. Try to use wp_enqueue_scripts for styles and scripts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment