Help with hacking wp_query! Help GREATLY appreciated!
-
I am trying to do something quite complicated. I’d love it if someone could help me code a solution!
<?php $my_query = new WP_Query('tag=XXX&showposts=10'); while ($my_query->have_posts()) : $my_query->the_post(); ?> STUFF HERE <?php endwhile; ?>
Basically, i’d like the XXX bit to automatically be echoed as the NAME of the current Page. I’m implementing this code in a page template, so for example if the page name was “Martin” it would echo
<?php $my_query = new WP_Query('tag=Martin&showposts=10'); while ($my_query->have_posts()) : $my_query->the_post(); ?> STUFF HERE <?php endwhile; ?>
Any help GREATLY appreciated!
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Help with hacking wp_query! Help GREATLY appreciated!’ is closed to new replies.