Posted By

twistedluke on 10/23/10


Tagged


Versions (?)

WordPress Loop with WPAlchemy custom metabox fields


 / Published in: PHP
 

  1. <?php query_posts('posts_per_page=6');
  2. if (have_posts()) : while (have_posts()) : the_post(); ?>
  3. <article id="post-<?php the_ID(); ?>" <?php post_class('post-item') ?> >
  4. <div class="post-content">
  5. <header>
  6. <h2><a href="<?php the_permalink() ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  7. </header>
  8. <p><?php the_excerpt() ?></p>
  9. <footer class="action">
  10. <?php while ( $billboard_metabox->have_fields_and_multi('links') ) { ?>
  11. <a href="<?php $billboard_metabox->the_value('link'); ?>" title="<?php $billboard_metabox->the_value('title'); ?>">&raquo; <?php $billboard_metabox->the_value('title'); ?></a>
  12. <?php } ?>
  13. </footer>
  14. </div>
  15. </article>
  16. <?php endwhile; else : ?>
  17. <?php endif; wp_reset_query(); ?>

Report this snippet  

You need to login to post a comment.