Showing posts on pages depending on category/page name
-
Hi Folks,
I hope there is someone out there, who is able to help me…
Here is what I want:
I want to display post on my pages. But only post from one category on the page with the same title…Through this code, that I found in this forum, I was able to call up posts on the pages.
<?php query_posts('category_name=straminke-eins'); ?> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?php the_ID(); ?> <?php if ( function_exists('jr_post_image') ) { jr_post_image($id); } ?> <?php the_date('F Y'); ?> <a href="<?php the_permalink()?>"><?php the_title()?></a> <?php the_excerpt(); ?> <?php endwhile; endif; ?>
But in this case it only shows post from category ‘straminke-eins’ on every page…
What I want is to make ‘category_name= ‘ variable so that every page only shows post from the category with the same name as the page title… Is this possible? Ans is it even understandable what I want?Nevertheless here is a link to the site I’m working on…
Your help would really be appriciated
Lots of Thanks in advance,
colo
- The topic ‘Showing posts on pages depending on category/page name’ is closed to new replies.