Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 3));
- while ( $loop->have_posts() ) : $loop->the_post();
- $custom = get_post_custom($post->ID);
- $product_url = $custom['product_url'];
- foreach ($product_url as $key => $value)
- echo $key . " => " . $value . "<br />";
- $custom = get_post_custom($post->ID);
- $case_study_url = $custom['case_study_url'];
- foreach ($case_study_url as $key => $value)
- echo $key . " => " . $value . "<br />";
- ?>
- // All my mark-up
- <?php endwhile; ?>
- <?php
- $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 3));
- while ( $loop->have_posts() ) : $loop->the_post();
- $product_url = get_post_meta($post->ID, 'product_url', true);
- $case_study_url = get_post_meta($post->ID, 'case_study_url', true);
- echo "Product: $product_url, Case Study: $case_study_url";
- ?>
- // All my mark-up
- <?php endwhile; ?>
- <?php
- $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 3));
- while ( $loop->have_posts() ) : $loop->the_post();
- $all_meta = get_post_custom($post->ID);
- foreach($all_meta as $meta_key => $meta_value)
- echo "$meta_key: $meta_value<br/>";
- endwhile;
- ?>
- <?php
- $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => 3));
- while ( $loop->have_posts() ) : $loop->the_post();
- $foo = get_post_meta($post->ID, 'Foo');
- print_r($foo);
- endwhile;
- ?>
Add Comment
Please, Sign In to add comment