Category Permalinks messed up
-
https://chrislaursen.com
WordPress 3.1.1Pretty sure this is connected with my recent upgrade to 3.1.1 as I have not changed any of the code in my index.php or category.php
Permalinks structure:
/work/%postname%/
with no custom settings for Category or Tag linksPost Categories:
main Category: work
children of work: video, photo, web, animationhtml links generated by
get_category_link
OLD GOOD LINKS: chrislaursen.com/category/video
NEW PROBLEMATIC LINKS: chrislaursen.com/work/category/work/video
category.php:
<?php get_header(); ?> <h3><?php if (is_category('54')) {echo "All Work";} else {single_cat_title();} ?></h3> <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; ?> <ol> <?php $posts = query_posts( $query_string . '&orderby=date&order=desc' ); while (have_posts()) : the_post(); ?> <li class="figure"> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'large'); $image_url = $image_url[0]; ?> <img src="<?php echo $image_url;?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /> <h4><?php the_title(); ?></h4> </a> <p><?php the_time('Y'); ?></p> <p><?php the_category(' · '); ?></p> </li> <?php endwhile; ?> </ol> <?php if(function_exists('wp_page_numbers')) : wp_page_numbers(); endif; get_footer(); ?>
index.php:
<?php get_header(); ?> <h3>Latest Project</h3> <?php $posts = query_posts( $query_string . 'posts_per_page=1&orderby=date&order=desc' ); while (have_posts()) : the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php $image_id = get_post_thumbnail_id(); $image_url = wp_get_attachment_image_src($image_id,'large'); $image_url = $image_url[0]; ?> <img src="<?php echo $image_url;?>" alt="<?php the_title(); ?>" title="<?php the_title(); ?>" /> <h4><?php the_title(); ?></h4> </a> <?php endwhile; ?> <h3>Do This Now</h3> <p class="firstp"><a href="<?php bloginfo('url'); ?>/contact" title="Contact" rel="bookmark">Hire us</a> for your multimedia projects: <a href="<?php echo get_category_link(4); ?>" title="view our video projects" rel="bookmark">video production</a>, <a href="<?php echo get_category_link(11); ?>" title="view our web design projects" rel="bookmark">web design</a>, <a href="<?php echo get_category_link(46); ?>" title="view our animation projects" rel="bookmark">animation</a>, and <a href="<?php echo get_category_link(5); ?>" title="view our photography projects" rel="bookmark">photography</a>.</p> <?php get_footer(); ?>
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Category Permalinks messed up’ is closed to new replies.