Created
September 30, 2009 03:31
-
-
Save hunk/197735 to your computer and use it in GitHub Desktop.
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 | |
query_posts('meta_key=_mf_write_panel_id&meta_value=id_of_the_Write_Panel&showposts=-1'); | |
//The Loop | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
//you code | |
endwhile; endif; | |
//Reset Query | |
wp_reset_query(); | |
//OR | |
$movie = new WP_Query('x__mf_write_panel_id=id_of_the_Write_Panel&showposts=-1'); | |
//The loop | |
if ($movie->have_posts()) : while ($movie->have_posts()) : $movie->the_post(); | |
// you code | |
endwhile; endif; | |
// {id of the Write panel} http://img.skitch.com/20090930-8u4s69g37mr3as27c8m434hgmx.jpg | |
?> |
Sorry, I am new to wordpress. How can I write it, is it to the template or function.php? how can I can I list 4 item (newest) from post-type=image. Can you show me a short code to begin with?
is there any way to do so in MF2?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am using magic field 2 how can you list only certain post type?