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
Php 继续阅读在Wordpress中不起作用_Php_Wordpress_Themes_Blogs - Fatal编程技术网

Php 继续阅读在Wordpress中不起作用

Php 继续阅读在Wordpress中不起作用,php,wordpress,themes,blogs,Php,Wordpress,Themes,Blogs,我的代码遇到了一个问题——我创建了一个定制页面,并将其集成到Wordpress中。在博客部分,我添加了以下功能: function new_excerpt_more($more) { global $post; return '... <a class="moretag" href="'. get_permalink($post->ID) . '"> continue reading &raquo;</a>'; } add_filter('exc

我的代码遇到了一个问题——我创建了一个定制页面,并将其集成到Wordpress中。在博客部分,我添加了以下功能:

function new_excerpt_more($more) {
    global $post;
  return '... <a class="moretag" href="'. get_permalink($post->ID) . '"> continue reading &raquo;</a>';
}
add_filter('excerpt_more', 'new_excerpt_more');
函数新建\u摘录\u更多($更多){
全球$员额;
返回“…”;
}
添加过滤器(“摘录更多”、“新摘录更多”);
但是,单击“继续阅读”不会显示全文。 你能告诉我在哪里解决这个问题吗?
谢谢

Mirek

检查content-single.php文件。它应该包含_content();以显示完整的post

你说它没有显示全文是什么意思?你的意思是它确实转到了另一个页面,但显示了摘录,还是说按钮根本没有重定向用户?很抱歉,没有具体说明-按钮根本没有重定向,但我找到了解决方案-我使用了旧语法-不得不将我的旧php文件重命名为content-single.php并更改为类“post body”并更改_摘录();到_content();最后只是反映了single中的变化。phpI认为是这样的,但为了得出结论,这些信息很重要。不管怎么说,看起来英国皇家空军在路上帮了你。如果他的答案有帮助,你应该接受它(箭头下的小检查)。如果没有,请自己(详细地)回答这个问题并接受它。谢谢英国皇家空军。我使用的是旧语法。我不得不将我的旧php文件重命名为content-single.php,并更改为类“post body”,并更改_摘录();到_content();最后,只反映single.php中的更改