Last active
October 21, 2016 19:33
-
-
Save ibrahimkholil/d1ca000f22cc243de4b911089ef45fc6 to your computer and use it in GitHub Desktop.
Custom post query
This file contains 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
<?php | |
global $post; | |
$args = array( 'posts_per_page' => 6, 'post_type'=> 'protfolio' ); | |
$protfolio = get_posts( $args ); | |
foreach( $protfolio as $post ) : setup_postdata($post); ?> | |
<?php | |
$protfolio_link= get_post_meta($post->ID, 'protfolio_link', true); | |
?> | |
<h2><?php the_title(); ?></h2> | |
<?php the_content(); ?> | |
<p><?php echo $protfolio_link; ?></p> | |
<?php endforeach; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment