Static Home Page, Post Page not working
-
Ok,
I have a static home page for CMS reasons. I have a blog section as well. I need my blog post to go to a “post page” which yes in wordpress (settings > reading) just select the page. So I create the template, call the correct header which inturns calls the correct style sheet. The page works and looks perfect. Now when I go to set the “post page” (in the settings) so the post show up on it, It reverts to stlye.css when it should be using style2.css and is calling the wrong header???
I dont think the code I have in my post page template is correct, does anyone here have the php code I need?
this is what i am using
post page template: < this is what i think is wrong<?php /* Template Name: diy */ ?> <?php include (TEMPLATEPATH . '/header_archive.php'); ?> <div id="content_box"> <div id="content" class="posts"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php include (TEMPLATEPATH . '/navigation.php'); ?> <div class="post_header"> <div class="post_header_img"> </div> <h1><?php the_title(); ?></h1> <p><?php the_time('F jS, Y') ?><!-- by <?php the_author() ?> --> · <?php the_category(' · ') ?></p> </div> <div class="entry"> <?php the_content('<p>Read the rest of this entry »</p>'); ?> <?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?> <p class="tagged"><strong>Tags</span>:</strong> <?php the_tags(' ',' · ') ?><span class="add_comment"><a href="#comments"></a></span></p> </div> <div class="clear"></div> <?php endwhile; else: ?> <h2 class="page_header">Uh oh.</h2> <div class="entry"> <p>Sorry, no posts matched your criteria. Wanna search instead?</p> <?php include (TEMPLATEPATH . '/searchform.php'); ?> </div> <?php endif; ?> </div> <?php get_sidebar(); ?> </div> <?php get_footer(); ?>
header:
<!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"> <head profile="http://gmpg.org/xfn/11"> <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" /> <title><?php if (function_exists('seo_title_tag')) { seo_title_tag(); } else { bloginfo('name'); wp_title();} ?></title> <meta name="generator" content="WordPress <?php bloginfo('version'); ?>" /> <!-- leave this for stats --> <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>" type="text/css" media="screen" /> <link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style_archive.css" type="text/css" media="screen" />
- The topic ‘Static Home Page, Post Page not working’ is closed to new replies.