Wordpress 如何在get_pages中获取数组中的pages id?

Wordpress 如何在get_pages中获取数组中的pages id?,wordpress,Wordpress,如果我有3个ID,比如 $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 ); 其o/p为 Array ( [0] => Array

如果我有3个ID,比如

$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 );
其o/p为

Array ( [0] => Array ( [text_string] => 2 ) [1] => Array ( [text_string] => 499 ) [2] => Array ( [text_string] => 869 ) )
我如何设置get_pages函数来获取关于带有这些页面ID的页面的所有信息

请帮助,谢谢参见:


我使用了“这是过去”并发现它非常有用,因为您可以获得页面的所有内容:

$mypages = get_pages( array( 'parent' => $post->ID ) );
// you could put any ID here, or any of the page identifiers in the get_pages function (https://codex.wordpress.org/Function_Reference/get_pages)

foreach( $mypages as $page ) {      
    $content = $page->post_content;
    if ( ! $content ) // Check for empty page
        continue;

   $content = apply_filters( 'the_content', $content );
?>
//This allows you to access any of the content on these pages, like this:

<div style="background-image: url('<?php echo get_the_post_thumbnail_url( $page, 'post-thumbnail' ) ?>'); ">"
    <p style="color: white; text-transform: uppercase;"><?php echo $page->post_title; ?></p>
</div>
$mypages=get_pages(数组('parent'=>$post->ID));
//您可以在此处放置任何ID,或者在get_pages函数中放置任何页面标识符(https://codex.wordpress.org/Function_Reference/get_pages)
foreach($mypages作为$page){
$content=$page->post_内容;
if(!$content)//检查是否有空页
继续;
$content=apply_过滤器('the_content',$content);
?>
//这允许您访问这些页面上的任何内容,如下所示:

“text_string”是页面id吗?我制作了类似这样的$page1=get_选项('home_page_field');$page2=get_选项('home_page_field1');$page3=get_选项('home_page_field2');$page4=get_选项('home_page_field3');$quote=get_选项('home_page_textF');$information=get_选项('home_page_textF');home_page_textArea');print_($information['text_string']);//$arrData=array($page1,$page2,$page3);//print_r($page1['text_string']);$arrData=get_pages('include='.$page1[“text_string”],'.$page2[“text_string”],'.$page3[“text_string”]);
$pages = array();
foreach($arrData as $item){
   $pages[(int)$item['text_string']] = get_page((int)$item['text_string']);
}
print_r($pages);
$mypages = get_pages( array( 'parent' => $post->ID ) );
// you could put any ID here, or any of the page identifiers in the get_pages function (https://codex.wordpress.org/Function_Reference/get_pages)

foreach( $mypages as $page ) {      
    $content = $page->post_content;
    if ( ! $content ) // Check for empty page
        continue;

   $content = apply_filters( 'the_content', $content );
?>
//This allows you to access any of the content on these pages, like this:

<div style="background-image: url('<?php echo get_the_post_thumbnail_url( $page, 'post-thumbnail' ) ?>'); ">"
    <p style="color: white; text-transform: uppercase;"><?php echo $page->post_title; ?></p>
</div>