Support » Fixing WordPress » posts with custom fields displayed on a page

  • Resolved Mark Shirley


    I have custom posts named movie they have custom field content and taxonomies (I’ve done this). Does anyone have code to display these posts on a page. ie – it could be a page called latest Movies and it would call the latest movies based on an actor called Paul Smith and a Actress called Jane Brown. My problem always seems to be the data from the custom fields doesnt show.

    A link to a good tutorial would be fine if nobody has code.

Viewing 1 replies (of 1 total)
  • I’ve nearly got what i need with code below I just need to be able to add the taxonomies of actor peter smith and actresss jane brown when calling movies.

    $postslist = get_posts('numberposts=4&order=DESC&orderby=date&post_type=movies');
    foreach ($postslist as $post) :
    <div id="post-wrapper">
    <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
    <h5>Price</h5> £<?php echo get_post_meta($post->ID, 'price', true); ?>
    <div id="copy-1"><?php the_field('copy_1'); ?></div>
    </div><!-- #post-wrapper -->
    <?php endforeach; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘posts with custom fields displayed on a page’ is closed to new replies.