Static home page and blog posting news page problem


Author Message
brian hackett

Posted: 1/29/2009
Quote message 

Hi I have a problem with one themes i have created in artisteer.I am running wordpress 2.7 and have made my home page a static page in wordpress reading options. I also wanted to use a blog form for my news items so I created a page called news and set it as my postings page in wordpress options.The static page works fine but when i go to my news page all that appears is my site header image and one button for my home page.It seems to be a problem with the theme because if I load the default wordpress theme everything works ok.

 
Marc Smith

Posted: 1/29/2009
Quote message 

Do you have any blog posts yet?

Do you have an URL so we can look at the error?

- Marc
 
Dan E.

Posted: 1/29/2009
Quote message 

I just did a site for a client with a static home page so we needed to solve the problem of having a page to show the blog -- in your case "news" summary.

Here is what we did.

Take "page.php" copy and rename it. Call it something like "newspage.php"

We will now make this new page a template specifically to show the blog / news posts.

At the top of the page replace this:

<?php get_header(); ?>


with this:

<?php get_header(); /* Template Name: News */ ?>


Now in the content area take this code:



<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>



and replace it with this:


<?php $temp_query = $wp_query; ?>
<?php query_posts('showposts=12'); ?>

<?php while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h3><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>

<?php global $more;
$more = 0;?>

<?php the_content('<br /><strong>Read the rest of this entry &raquo;</strong>'); ?>

</div>
<?php endwhile; ?>


now create a new page (NOT POST) and you will see in the template menu "News"

Set the page to that, publish it and now you will have a page that shows all your psot with summary's. make sure to put in "Read more" breaks as well.


 
Brian Hackett

Posted: 1/30/2009
Quote message 

Hi Dan
I did that and it worked a treat .Thanks very much
Brian
 
Dan E.

Posted: 1/30/2009
Quote message 

Quote Brian Hackett:

Hi Dan
I did that and it worked a treat .Thanks very much
Brian

Glad I could help!!
http://www.highrockmedia.com

 
Jamie

Posted: 4/14/2009
Quote message 

I tried this, but my page structure seems to be completely different. Brians content area code is different than mine.

Screen Grab below:


Any ideas chaps??
 
Marc Smith

Posted: 4/14/2009
Quote message 

Without an URL to look at th problem, there's not much help I can offer.