Last active
August 29, 2015 14:13
-
-
Save shahadat014/57999acf65164eb5bc36 to your computer and use it in GitHub Desktop.
Custom-posts-global-query
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Custom-posts-global-query | |
| <?php | |
| global $post; | |
| $args = array( 'posts_per_page' => -1, 'post_type'=> 'posttype', 'orderby' => 'menu_order', 'order' => 'ASC' ); | |
| $myposts = get_posts( $args ); | |
| foreach( $myposts as $post ) : setup_postdata($post); ?> | |
| <?php | |
| $job_link= get_post_meta($post->ID, 'job_instructions', true); | |
| ?> | |
| <h2><?php the_title(); ?></h2> | |
| <?php the_content(); ?> | |
| <p><?php echo $job_link; ?></p> | |
| <?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment