• Resolved kim296

    (@kim296)


    I am using a custom field “rdate” to enter the current date or date of event for my post. I am trying to query this information on my sidebar, but can’t get it to work. Can someone please help me with this code, so that it will so my information.

    <?php
    global $query_string;
    query_posts( $query_string . ‘&meta_key=rdate&orderby=meta_value&order=asc’);?>
    <?php while (have_posts()) : the_post(); ?>

    <?php endwhile;
    wp_reset_query();?>

    I was using the plug-in “Advanced Custom Fields” and this query worked. I changed to “Types – Complete Solution for Custom Fields and Types” because my post category check boxes wouldn’t work with Advanced Custom Fields. Now, my query doesn’t work. Does anyone know how I can fix this?

Viewing 1 replies (of 1 total)
  • Thread Starter kim296

    (@kim296)

    The following code fixed my problem:

    <?php query_posts(‘category_name=events&orderby=meta_value&order=asc’); ?>
    <?php while (have_posts()) : the_post(); ?>

    <?php endwhile;
    wp_reset_query();?>

Viewing 1 replies (of 1 total)

The topic ‘Custom Fields Help’ is closed to new replies.