• I hope someone can help me on this…

    The site I’m working on is here.

    I have a custom, semi-static home page. That works fine. it’s got two selective loops at the bottom of the static content.

    My issue is that I can’t get the Posts page to work. Or at least get it to pick up the template.

    I have a template called radical-ideas.php and a page with a slug of radical-ideas that is set to use the template file radical-ideas.php.

    Even though I seem to have it set up correctly, when I navigate to radical-ideas.php, it seems to be using the default template. When I make changes to the radical-ideas.php file, they don’t show up, and the navigation indicator seems to think that it’s on the home page.

    Here’s the template radical-ideas.php

    <?php
    /*
    Template Name: Radical Ideas Blog
    */
    ?>
    <?php get_header(); ?>
    
    	<div id="content_box">
    
    		<div id="content">
    
    <?php $posts = get_posts( "numberposts=10" ); ?>
    		<?php if (have_posts()) : ?>
    
    			<?php while (have_posts()) : the_post(); ?>
    
    			<h2>FOO<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
    			<p class="post_date"><?php the_time('F jS, Y') ?> — <?php the_category(', ') ?></p>
    			<div class="entry">
    				<?php the_content("Continue reading &rarr;"); ?>
    			</div>
    			<p><?php the_tags('<b>Tags:</b>', ',', '<br />'); ?></p>
    			<p class="post_meta"><span class="add_comment"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span></p>
    			<?php edit_post_link('Edit', '', ' | '); ?>
    			<?php endwhile; ?>
    
    			<?php include (TEMPLATEPATH . '/navigation.php'); ?>
    
    		<?php else : ?>
    
    			<h2>If you're seeing this, it's time to go slap somebody.</h2>
    			<p class="post_date">* * *</p>
    			<div class="entry">
    				<p>Sorry, but you are looking for something that isn't here.</p>
    				<?php include (TEMPLATEPATH . "/searchform.php"); ?>
    			</div>
    
    		<?php endif; ?>
    
    		</div>
    
    		<?php get_sidebar(); ?>
    
    	</div>
    
    <?php get_footer(); ?>

    What the heck am I doing wrong?! I’m going nuts with this…

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter beemermonkey

    (@beemermonkey)

    What’s even more weird is that if I create a new page, say posts-page, and assign it the template of radical-ideas.php in the write page editor, the page shows up with the correct (but apparently broken) template!

    http://radicalpowersports.com/posts-page/

    I can’t figure out why i can’t get the radical-ideas page to even pick up the template!

    Of course if I do I’m stuck with the issue of why the template is only showing one post…

    I’m going nuts here!!!

    What the heck am I doing wrong?
    It depends what do you want to achieve…

    when I navigate to radical-ideas.php
    That’s the first big mistake. You should never ever try to access directly a template file. Ever.
    You make a new Page by using the template and do not try to display the template itself!

    Thread Starter beemermonkey

    (@beemermonkey)

    That’s the first big mistake. You should never ever try to access directly a template file. Ever.

    Thanks fo rthe quick response…

    I know that. I navigate to the slug of radical-ideas. The page that is the slug is set up with the template that is radical-ideas.php

    When I go to edit the page “radical ideas”, the template drop down is even showing that it’s assigned to the template file I pasted in above (i.e. radical-ideas.php) but the page is not rendering on the display site with that template.

    I seems to be set up properly AFAICT…

    but the page is not rendering on the display site with that template.

    What is the proof for that?

    Thread Starter beemermonkey

    (@beemermonkey)

    What is the proof for that?

    Well, there’s two bits of proof:

    1) The navigation indicator when I go to the blog section is highlighting the home tab which indicates to me that the internals of WP think that the radical-ideas page is the home/index.

    2) This one is easy… The template file radical-index.php is well, radically from the index.php template. I insert the static content of FOOBAR in the template for radical-ideas and the word FOOBAR is nowhere to be seen on the page.

    Again, if I create another page, say foofoo and assign it the radical-ideas.php based template it DOES pick up the template.

    The issue/bug seems to be that if you set a page under Options>Reading>Front page displays that page will not pick up the template specified in the manage>pages>template.

    Did you ever solve this? Seems like the problem is still there in WP 2.6.1… 🙁

    The issue is that any “post” page selected in the Reading Options will only pull the default (index.php) template, and not the template that is specified by the Page entry.

    Removing the page from the “post” designation, and navigating to the slug will show the correct page template. 🙁

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘PLEASE help! : Static home and custom Posts page’ is closed to new replies.