Many wordpress Queries with a page as index
-
Hey ppl,
I have a tricky question where i could not find any solution using wordpress Codex.
Anyway my problem is that a friend of mine has a blog. His first page is a page actually and not the latest posts he made.
He wants me to make him a widget to show last post of some categories in a accordion Jquery menu.
While it works, at the_title it loads the name of the page it is been displayed, and not the post name…
So, i moved to the codex and at the loop, and tried to use the
<?php $my_query = new WP_Query(‘category_name=special_cat&showposts=10’); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!– Do special_cat stuff… –>
<?php endwhile; ?>where i load content for a category. BUT if i try to use it second time,copy paste it and change the category id, to parse one more category, it does not show anything it just plays the first category only.
I have also tried to use the following code with or without the <?php rewind_posts(); ?>
<?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
<!– Do special_cat stuff… –>
<?php endwhile; ?>Nothing i can get a solution…
If u want to check the site, let me know ??
Thanks for any help,
Basilakis
- The topic ‘Many wordpress Queries with a page as index’ is closed to new replies.