I'm having a real problem getting this to work.
I want to display select posts at the bottom of my home page.
I am using the following code to get the posts
<?php
$type = '';
$args=array(
'post_type' => $type,
'post_status' => 'publish',
'paged' => $paged,
'posts_per_page' => 2,
'caller_get_posts'=> 1
);
$temp = $wp_query; // assign orginal query to temp variable for later use
$wp_query = null;
$wp_query = new WP_Query($args);
?>
<?php
get_template_part( 'loop', 'index' );?>
If I leave $type = ''; blank it pulls in 2 posts but not the ones I want.
If I change type to $type = 'homepage'; or $type = 'yes'; it says posts not found.
On the posts in question I have added a custom field like so.
NAME: homepage Value: Yes
I almost have it working but its killing me trying to get it to filter the posts. Can anyone help with this please!!!!!
I have checked the codex and its not making any sense to me.