我正在为 WordPress 选项面板使用 OptionTree,我正在获取页面 ID,并使用该页面 ID 将页面的内容填充到另一个页面。这是我的代码:
<?php
$test_input = ot_get_option( 'for_myapp_features' );
?>
<?php $the_query = new WP_Query( 'page_id=$test_input' ); ?>
<?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
<?php the_title(); ?>
<?php the_excerpt(); ?>
<?php endwhile;?>
任何帮助都会有所帮助。