Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.
$page1 = get_option('home_page_field');
$page2 = get_option('home_page_field1');
$page3 = get_option('home_page_field2');
$page4 = get_option('home_page_field3');


 $arrData = array( $page1, $page2 , $page3 );

its giving o/p as

Array ( [0] => Array ( [text_string] => 2 ) [1] => Array ( [text_string] => 499 ) [2] => Array ( [text_string] => 869 ) )

how can i set get_pages function to get the all info about the pages with these pages ids with me

PLease help Thanks

share|improve this question

1 Answer 1

You can use include argument (see get_pages() in Codex for details and examples) to retrieve specific set. To continue your snippet that would be:

$pages = get_pages( array(
    'include' => $arrData,
) );
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.