Give help. Get help.

  • # May 8, 2013 at 4:25 am

    Hi there, I wonder if anybody can help me.

    I am querying custom fields of custom post types which output tabular data. Chris says in his book that “_the loop doesn’t care about markup_” but I really cant get wp_query to output in to a html table. I want to out put the custom meta data from each post to a new row in the table.
    The custom fields output fine in paragraph or header tags, just not in tables.
    Even tables with static data don’t display…

    Code something like this:

    < ?php $the_query = new WP_Query( $args ); ?>

    < ?php while ($the_query->have_posts()) : $the_query->the_post(); ?>

    < ?php endwhile; ?>

    < ?php echo the_title(); ?> < ?php the_field("field_one"); ?> < ?php the_field("field_two"); ?> < ?php the_field("field_three"); ?>

    Should this work or is there a better way?!

    Many thanks in advance, David

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.