WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top
$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

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


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.