调用未定义的函数gcb()在wordpress中

时间:2015-06-26 09:13:58

标签: wordpress

致命错误:在第10行的D:\ wamp \ www \ isee \ wp-content \ themes \ isee \ home.php中调用未定义的函数gcb()

enter image description here

这是我的代码

*/
get_header(); 
echo homeslider_function(); ?>  
<article id="first-article"><?php echo gcb(1);?></article>
<article id="second-article"><?php echo gcb(2);?></article>

第10行是gcb(1)

1 个答案:

答案 0 :(得分:0)

It looks like you need to install the Global Code Blocks plugin.

From the FAQ page:

Can I use content blocks outside of posts and pages?
Yes, just wrap it in the PHP function <?php echo gcb(x);?> where x is the content block ID. You can also use the longer form <?php do_shortcode("[contentblock id=x]");?>