How to redirect a category to a WP Page
-
I am trying to have all post from one category automatically redirect to one of my tabs/pages. I have tried the following. 1.copying my page.php and creating a new page template looking like this
<?php
/*
Template Name: Farm Page
*/
?>
<?php get_header(); ?>
<?php query_posts(‘cat=86’); ?>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post-box page-box”>
<div class=”post-header”>
<h1 class=”pagetitle”><?php the_title(); ?></h1>
</div><!–end post-header–>
<div class=”entry page clear”>
<?php the_content(); ?>
<?php edit_post_link(__(‘Edit This’,'<p>’,'</p>’, ‘paperpunch’)); ?>
<?php wp_link_pages(); ?>
</div><!–end entry–>
</div><!–end post-box–>
<?php endwhile; /* rewind or continue if all posts have been fetched */ ?>
<?php comments_template(”, true); ?>
<?php else : ?>
<?php endif; ?>
</div><!–end content–>
<?php get_sidebar(); ?>
<?php get_footer(); ?>Are there things here I just havent done properly here?
I have also tried a redirect plugin, but that doesnt work either! Could this be an issue with my template? So confused! Thanks
- The topic ‘How to redirect a category to a WP Page’ is closed to new replies.