我正在使用Portfolio插件。它要求我将以下短代码添加到我想要显示内容的页面
[nimble-portfolio template="2colmosaic" types="3,4,5" items_per_page="3"]
当我执行以下操作时
$view = get_page_by_title('View');
echo $view->post_content;
显示
[nimble-portfolio template="2colmosaic" types="3,4,5" items_per_page="3"]
作为渲染时的文字
修改
我尝试了以下
echo apply_filter('the_content', $view->post_content);
但它现在不渲染整页。并停止到那一点。
答案 0 :(得分:1)
请尝试以下代码,然后让我知道这个案例 -
<?php echo do_shortcode($view->post_content); ?>