Last active
August 29, 2015 14:14
-
-
Save shahidulislamus/64c1f0e4ec725d5df232 to your computer and use it in GitHub Desktop.
hear "put_hear_custom_field's_variable"="custom field's value pass by its variable" ===========hear "job_link"="pass that variable's value into this" ==========hear "put_hear_your_post_type_neme"="put hear the custom post type name i mean register_post_type('this name'array());"
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' => 10, 'post_type'=> 'put_hear_your_post_type_neme' ); | |
$myposts = get_posts( $args ); | |
foreach( $myposts as $post ) : setup_postdata($post); ?> | |
<?php | |
$job_link= get_post_meta($post->ID, 'put_hear_custom_fields_variable', 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