I am trying to create a drop-down page containing all pages, I tried:
‘select’
,’field’ => ‘mypage’
,’label’ => ‘Select a page’
,’attributes’ => array(‘class’ => ‘text’)
,’choices’ => piklist(
get_pages(
array(
‘sort_order’ => ‘ASC’,
‘sort_column’ => ‘post_title’,
‘hierarchical’ => 1,
‘post_type’ => ‘page’,
‘post_status’ => ‘publish’
)
,’objects’
)
,array(‘id’,’post_title’)
)
));
but it only shows one page in the dropdown. This is the only file in my plugin. What am I doing wrong?