0
我似乎无法让我的自定义元(wp_alchemy)显示与下面。剩下的工作正常,它会显示使用自定义模板的页面。WordPress的自定义元不显示
<?php // Display list of pages using the template page-landing.php
$product_pages_args = array(
'meta_key' => '_wp_page_template',
'meta_value' => 'page-landing.php',
'depth' => -1,
'hierarchical' => 0
);
$product_pages = get_pages($product_pages_args);
//$custom_metabox = get_post_meta($post->ID,'_custom_meta',TRUE);
echo '<table>
<thead>
<tr>
<td>Service name</td>
<td>Cost</td>
</tr>
</thead>';
foreach ($product_pages as $product_page) {
echo '
<tr>
<td>
<a href="'.get_permalink($product_page->ID).'">'.$product_page->post_title .'</a>
</td>
<td>'; ?>
<?php
$custom_metabox = get_post_meta($post->ID,'_custom_meta',TRUE);
echo $custom_metabox['landing-para'];
echo '</td>
</tr>';
}
echo '</table>'; ?>
'$ product_page-> ID'!='$ post-> ID',你是否看到错误? ;) –