• Resolved mrspabs

    (@mrspabs)


    I wanted to have a static page and a blog page

    I created a blank page called home, and a home.php and assigned home to use the home.php template.

    I created a blank page called blog and I created an index.php that looks like the below.

    I went into Reading settings and I selected home for Front page displays and blog for Posts Page.

    The front page is working. However, when i click on blog, it gives me https://blueharbors.com/?page_id=84, and it display the homepage template instead.

    Here is the content of my home.php

    <?php
    /*
    Template Name: Home
    */
    ?><?php get_header(); ?>
    
    <!-- header-box end -||- content-box start -->
    <div class="content-box">
    	<div class="content-area">
    		<div class="img-box">
                            <img src="/rotate.php" alt="Blue Harbors SAP Consultants USA" width="954" height="324"  />
    			<div class="txt-box">
    				<div class="txt">
    					<p class="title"><strong>Simplify your supply chain.</strong></p>
    					<p>We connect your systems so deliveries are there on time</p>
    					<p class="link-more"><a href="https://blueharbors.com/?page_id=5">Learn More >></a></p>
    				</div>
    				<div class="bottom"></div>
    			</div>
    		</div>
    	</div>
    </div>
    
    <?php get_sidebar('home'); ?>
    
    <?php get_footer(); ?>

    And here is my index.php

    <?php get_header(); ?>
    
    <!-- header-box end -||- content-box start -->
    <div class="content-box">
    	<div class="content-area">
    		<!-- content-main start -->
    		<div id="content-main">
    
    			<div style="width:705px; background-color:#939393; color:#fff;line-height:30px; font-size: 20px; font-weight: bold; font-family: verdana;padding:8px;">Blog</div>
    			<div id="content" style="width:680px;">
    
    	<?php if (have_posts()) : ?>
    
    					<?php while (have_posts()) : the_post(); ?>
    
    						<div class="post" id="post-<?php the_ID(); ?>">
    
    							<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2>
    							<p style="font-size:10px;"><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></p>
    
    								<?php the_content('Keep reading &rarr;'); ?>
    
    							<div align="right"><?php comments_popup_link('Post a Comment', '1 Comment', '% Comments'); ?> | 								<p class="tagged">Filed under <?php the_category(', ') ?></div>
    						</div>
    
    					<?php endwhile; ?>
    
    				<?php else : ?>
    
    					<h2 class="center">Not Found</h2>
    					<p class="center">Sorry, but you are looking for something that isn't here.</p>
    					<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    
    				<?php endif; ?>
    
    			</div>
    
    		</div>
    		<!-- content-main end -||- sidebar start -->
    		<?php get_sidebar('blog'); ?>
    		<!-- sidebar end -->
    	</div>
    </div>
    
    <?php get_footer(); ?>

    My single.php https://blueharbors.com/?p=1 and my archive https://blueharbors.com/?m=200908 work fine.

    I do not know if this is related, but my permalinks do not work due to weirdness with yahoo hosting.

    Any suggestions?

Viewing 2 replies - 1 through 2 (of 2 total)
  • @mercime

    (@mercime)

    Rename your home.php to something else e.g. homepage.php
    -home.php is a special WordPress file in template hierarchy.

    Thread Starter mrspabs

    (@mrspabs)

    Brilliant, thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Blog page not showing up as blog’ is closed to new replies.