• Resolved thejester12

    (@thejester12)


    Howdy, I’m trying to get a really simple loop to work on this page of my website. It would basically just create the select box under “Find Designs with your favorite CMS” and autofill in all of the names I need. I’ve tried several methods of this after reading through The Codex Loop Page several times. But nothing seems to work.

    This should output all posts (not just limited to 10) in alphabetical order in a certain category. The category seems to be the only thing that works!

    Any help would be appreciated!

    <select name="cmsname">
    <?php $my_query = new WP_Query('orderby=title&order=asc&showposts=0&cat=3'); ?>
    <?php while ($my_query->have_posts()) : $my_query->the_post(); ?>
    <option value="<?php meta('thecmstag'); ?>"><?php the_title(); ?></option>
    <?php endwhile; ?>
    </select>
Viewing 2 replies - 1 through 2 (of 2 total)
  • Works okay (posts ordered by title) but I had to set showposts=-1. Also had to change meta('thecmstag'); to the_title(); as meta is an invalid function on my test blog.

    Thread Starter thejester12

    (@thejester12)

    Thanks so much, I took your recommendation and used showposts=-1, that works great. I think I figured out that a plugin was getting in the way of displaying the posts alphabetically. I’ll work on that later. I appreciate the help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘WP_Query Parameters Not Working?’ is closed to new replies.