Try updating your permalinks.
Admin dashboards –> Settings –> Permalinks
and simply “Save changes”
see if this solves the issue.
Did you set the /myblog/ page as the “Posts” page in the Settings->Reading area?
It’s weird but that entire page is just blank. You said you were using a template for the page? Try turning off the template temporarily to see if you can get at least something to show up on that page, like the header.
Nice website by the way!!
Hi buddha,
Tried that nothing.
Hi jessn, and thanks, hopefully will be finished if I stop tweaking.
Tried that and nothing, however I put the post to page as myblog and my post showed (not the blog posts tho), I have now reset this and the posts are back on the clients page where they should be (again not the myblog posts.
I would expect that because I have changed where the posts reside (IE not on the generic homepage), I need to update the myblog template page but thats just a guess…..
**update**
If I choose the defauly template it does show a default page so must be something to do with the template file
CODE USED BELOW:::
<?php
/*
Template Name: Myblog
*/
global $more;
?>
<?php
$paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1;
$args= array(
‘category_name’ => ‘blog’,
‘paged’ => $paged
);
query_posts($args);
?>
<?php get_header(); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class=”post” id=”post-<?php the_ID(); ?>”>
<h2><?php the_title(); ?></h2>
<?php $more = 0;the_content(‘<p class=”serif”>Read the rest of this page »</p>’); ?>
<?php wp_link_pages(array(‘before’ => ‘<p>Pages: ‘, ‘after’ => ‘</p>’, ‘next_or_number’ => ‘number’)); ?>
</div>
<?php endwhile; endif; ?>
<?php edit_post_link(‘Edit this entry.’, ‘<p>’, ‘</p>’); ?>
<?php include (TEMPLATEPATH . “/bottom.php”); ?>
<?php get_footer(); ?>
Ok I see…looks like you’re doing something similar to a blog I set up recently. Try this code:
<?php
/*
Template Name: Myblog
*/
?>
<?php get_header(); ?>
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('showposts=10&category_name=blog'.'&paged='.$paged);
?>
<?php while ($wp_query->have_posts()) : $wp_query->the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<?php $more = 0;the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p>Pages: ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
<?php endwhile; ?>
<?php edit_post_link('Edit this entry.', '<p>', '</p>'); ?>
<?php include (TEMPLATEPATH . "/bottom.php"); ?>
<?php get_footer(); ?>
That code works great for me. I’m guessing the “global $more;” that you have in your template name is what’s screwing up the page.
Hi jessn,
Don’t know what you did but it worked a treat!!!!
Thanks to you both for helping out.
Jayce