Blog Off Index With It's Own Directory Broken After WordPress Update?
-
I set a static homepage and my blog at mysite.com/blog/
I created a template called blog and a page with the slug URL of mysite.com/blog/ and assigned the blog template.
When this was working I had my permalink structure at /blog/%postname%/
For some reason the code I have to display excerpts in the blog template is no longer working. The template is displaying however.
I can’t remember where I got the code to output post excerpts for this template.
Here’s the code that I have. Forgive the extra markup:
<?php /* Template Name: Blog */ // Which page of the blog are we on? $paged = get_query_var('paged'); query_posts('cat=-0&paged='.$paged); // make posts print only the first part with a link to rest of the post. global $more; $more = 0; //load index to show blog load_template(TEMPLATEPATH . '/blog.php'); ?> <?php get_header(); ?> <div class="container_24 wrap-row clearfix"> <div class="grid_16"> <h1>My Blog</h1> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <article class="excerpt media"> <a class="img" href="<?php the_permalink() ?>"> <?php //This must be in one loop if(has_post_thumbnail()) { the_post_thumbnail("thumbnail-s-c"); } else { echo get_avatar( $id_or_email = get_the_author_meta('user_email'), $size = '100', $default = '<path_to_url>' ); } ?> </a> <div class="bd"> <h2 class="title h4"><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"> <?php the_title(); ?> </a></h2> <?php the_excerpt(); ?> </div> </article> <?php endwhile; else: ?> <p>Sorry, no posts we're found.</p> <?php endif; ?> <p> <?php posts_nav_link(); ?> </p> </div> <div class="grid_8"> <?php get_sidebar('blog'); ?> </div> </div> <?php get_footer(); ?>
You’ll notice I’m outputting some markup and image thumbs for styling.
Am I doing something wrong and did something change that makes this technique no longer work
- The topic ‘Blog Off Index With It's Own Directory Broken After WordPress Update?’ is closed to new replies.