I've this wordpress get_posts
arguments:
$arg = array(
'orderby' => 'rand',
'numberposts' => 1,
'post_type' => 'dmd_berater',
'post_name' => 'test1',
'meta_query' => array(
'key' => 'dmd_subject',
'value' => 'Daten und Analysen',
'compare' => 'LIKE'
),
);
$consultant_post = get_posts($arg); //contains ALL posts.
The code above contains all posts but I only want the post with the post_name
'test1'.
Is this possible? And how?
It should be great if I can output three specific posts. I think it should be work with an array? Like:
'post_name' => array('test1', 'test2', 'test3'),
- Can somebody find my issue?
- Is an array possible?