• thetaxidermist

    (@thetaxidermist)


    Ok so I have a static home page. But I also have a blog. My problem is getting a post page to work correctly. bostonstandardplumbing.com is the URL of subject. I have DIY blog and right now I cant seem to get a post page working where it shows, say the most recent 10 post.

    You will notice it is a drop down with post cats, I dont want it to be like this but I have to because I cant get the post page working correctly. I think I am messing the code up for the post page template and is why I cant get it work. Does anyone have the correct code for the post page? Im pretty good at linking templates to headers to style sheets ect, as the whole site has many different headers and css files to work.

    Now the really odd thing is that when I publish the post page it references the correct style sheet (style-archive.css) but when i make it the post page in WP options it then references the wrong style sheet (style.css)… Why would it do this???
    here is my code

    header file

    <!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" />
    
    	<!--[if lte IE 7]>
    
    	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie7.css" media="screen" />
    
    	<![endif]-->
    
    	<!--[if lte IE 6]>
    
    	<link rel="stylesheet" type="text/css" href="<?php bloginfo('template_url'); ?>/ie6.css" media="screen" />
    
    	<![endif]-->
    
    	<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
    
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    	<?php wp_head(); ?>
    
    </head>
    
    <body class="custom">
    
    <div id="container">
    
    	<div id="masthead">
    
            <h2><a id="home" href="http://www.bostonstandardplumbing.com">
    
    		<?php bloginfo('description'); ?></a></h2>	  
    
    		<h3>p: 617-288-2911</h3><br /><br />
    
            <p>247 Savin Hill Ave<br />
            Boston, Ma 02125</p>
    <?php /*?>		 <?php include (TEMPLATEPATH . '/searchform.php'); ?>
    <?php */?>
    
    </div>
    
    	<div class="clear">
    
    </div>
    
    <?php if (function_exists('suckerfish')) {suckerfish();} ?>
    <?php /*?><ul id="nav">
    
    		<li><a <?php if (is_page('about')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/about/">About Us</a></li>
    
            <li><a <?php if (is_page('contact-us')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/contact-us/">Heating</a></li>
    
            <li><a <?php if (is_archive() || is_page('archives')) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>/archives/">Plumbing</a></li>
    
    		<li><a <?php if (is_home()) echo('class="current" '); ?>href="<?php bloginfo('url'); ?>">Home</a></li>
    
    	</ul><?php */?>
    
    	<div id="header_img">    
    
        <?php if (is_page('home')) { ?>
    
    		<img src="<?php bloginfo('template_url'); ?>/images/blog-header1.jpg" width="898" height="350" alt="<?php bloginfo('name'); ?> home page header image" title="<?php bloginfo('name'); ?> home page header image" />
    
    		<?php } elseif (is_page('about')) { ?>
    
    		<img src="<?php bloginfo('template_url'); ?>/images/blog-header1.jpg" width="898" height="350" alt="<?php bloginfo('name'); ?> about page header image" title="<?php bloginfo('name'); ?> about page header image" />
    
    		<?php } else { ?>
    
    		<img src="<?php bloginfo('template_url'); ?>/images/blog-header1.jpg"<?php echo(rand(1,1)); ?>.jpg" width="898" height="350" alt="<?php bloginfo('name'); ?> random header image" title="<?php bloginfo('name'); ?> " />
    
    		<?php } ?>
    
    <!--        <h2>Boston Standard</h2>
    -->
    		<?php wp_quotes_random(); ?>
    
    </div>

    DIY.php < page template

    <?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(); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Static Home Page & Post Page’ is closed to new replies.