Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- switch_to_blog(152);
- $args = array (
- 'post_type' => 'faculty_profile',
- 'orderby' => 'meta_value',
- 'meta_key' => 'sortby',
- 'order' => 'ASC',
- 'posts_per_page' => -1,
- );
- query_posts( $args );
- if ( have_posts() ) : while ( have_posts() ) : the_post();
- echo "<p><strong>";
- echo '<a href="' . get_permalink( get_the_ID() ) . '">';
- the_title(); echo "</a></strong><br />";
- echo '<em>' . get_post_meta(get_the_ID(), "faculty-title", true) . '</em>';
- echo "<br />";
- echo nl2br(get_post_meta(get_the_ID(), "degrees", true));
- echo "</p>";
- endwhile; else:
- echo 'No faculty in this department or program.';
- endif;
- //Reset Query
- wp_reset_query();
- restore_current_blog();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement