Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/230.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Wordpress-在同一页面中加载多个具有特色图像的页面_Php_Wordpress_Custom Wordpress Pages - Fatal编程技术网

Php Wordpress-在同一页面中加载多个具有特色图像的页面

Php Wordpress-在同一页面中加载多个具有特色图像的页面,php,wordpress,custom-wordpress-pages,Php,Wordpress,Custom Wordpress Pages,我有一个自上而下的页面,加载这个主页中的所有页面,我对每个页面都这样做 <?php $about = get_page_by_title('About'); echo $about->post_title $thumb_id = get_post_thumbnail_id($about); $abouturl = wp_get_attachment_thumb_url($thumb_id); echo $abouturl; echo $

我有一个自上而下的页面,加载这个主页中的所有页面,我对每个页面都这样做

<?php
    $about = get_page_by_title('About');
    echo $about->post_title
    $thumb_id = get_post_thumbnail_id($about);
    $abouturl = wp_get_attachment_thumb_url($thumb_id);
    echo $abouturl;
    echo $about->post_content;
?>

问题是当页面被加载时,有时图像在所有有图像的地方总是相同的。我已经查过缓存了。 也许当我加载完每一页后,我必须重置一些东西

我怎样才能解决这个问题? 多谢各位