• 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() ?> --> &middot; <?php the_category(' &middot; ') ?></p>
    				</div>
    
    			<div class="entry">
    				<?php the_content('<p>Read the rest of this entry &raquo;</p>'); ?>
    				<?php link_pages('<p><strong>Pages:</strong> ', '</p>', 'number'); ?>
    <p class="tagged"><strong>Tags</span>:</strong> <?php the_tags('&nbsp; ',' &middot; ') ?><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" />

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter thetaxidermist

    (@thetaxidermist)

    my header code is truncated for the purpose of not having really to need to show the rest. but you can see that i am calling the right css file…

    first , this is your header.php or header_archive.php ?
    second, in the header you postes, there is one empty call to a css…. (IMHO)

    Thread Starter thetaxidermist

    (@thetaxidermist)

    they are the correct files… in my original post i just use style2.css and header.php for argument sake…

    what i mean is , that the link is empty in your code

    <link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>" type="text/css" media="screen" />

    Thread Starter thetaxidermist

    (@thetaxidermist)

    Its part of the cutline template I’ve modded… So any help? does anyone know what the proper code I should have is inside my page template?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Static Home Page, Post Page not working’ is closed to new replies.