Hi,
Scenario , If a customer click on my Wp category link ,but it open the post in that Category. What i need is when any customer click on the wp category , it opens the static page with post showing at the bottom.
Thanks .. I need your help..
Hi,
Scenario , If a customer click on my Wp category link ,but it open the post in that Category. What i need is when any customer click on the wp category , it opens the static page with post showing at the bottom.
Thanks .. I need your help..
Create a Category Template that not only displays the posts from that category but also uses the template tag, query_posts(), page_id= parameter.
To do that with the WordPress Default theme, copy wp-content/themes/default/archive.php to wp-content/themes/default/category.php, then add this code just before the <?php while (have_posts()) : the_post(); ?> line:
<?php
$my_query = new WP_Query('page_id=2');
while ($my_query->have_posts()) : $my_query->the_post();
the_title();
the_content();
endwhile;
?>
That assumes you have a page id of 2 to display.
Of course, if you only wanted this for say Category ID 6, then you would copy archive.php to category-6.php instead of category.php.
Resources:
Stepping Into Template Tags
Stepping Into Templates
Template Hierarchy
perfect
thanks
This topic has been closed to new replies.