Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/performance/5.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
如何在wordpress post中显示与作者姓名和日期内联的自定义内容?_Wordpress - Fatal编程技术网

如何在wordpress post中显示与作者姓名和日期内联的自定义内容?

如何在wordpress post中显示与作者姓名和日期内联的自定义内容?,wordpress,Wordpress,我需要在wordpress post中显示与作者姓名和日期内联的自定义内容。我该怎么做 function display_count() { global $post; return "Character Count =".strlen( wp_strip_all_tags(strip_shortcodes($post->post_content))); } add_filter('get_the_date', 'display_count'); 在这里分享你的最佳尝试你可

我需要在wordpress post中显示与作者姓名和日期内联的自定义内容。我该怎么做

function display_count() {
   global $post;
   return "Character Count =".strlen( wp_strip_all_tags(strip_shortcodes($post->post_content)));
}

add_filter('get_the_date', 'display_count');

在这里分享你的最佳尝试你可以尝试我正在创建我自己的插件,我需要在其中添加文本到日期和作者姓名。哪一个过滤器或行动挂钩可以工作?我尝试获取日期()如果需要帮助,必须共享代码。请用您正在努力处理的代码段编辑您的问题…函数display_count(){global$post;return“Character count=“.strlen(wp_strip_all_标记(strip_短代码($post->post_content));}添加_过滤器('get_the_date','display_count');在这里分享你的最佳尝试你可以尝试我正在创建我自己的插件,我需要在其中添加文本到日期和作者姓名。哪一个过滤器或行动挂钩可以工作?我尝试获取日期()如果需要帮助,必须共享代码。请用您正在努力处理的代码段编辑您的问题…函数display_count(){global$post;return“Character count=“.strlen(wp_strip_all_标记(strip_短代码($post->post_content));}添加_过滤器('get_the_date','display_count');