-1
任何人都知道如何仅在wordpress中排除get_the_content()函数的第一个字母?从get_the_content()wordpress函数中排除句子的第一个字母
可能是这样的片段,但它不起作用!
substr(strip_tags(get_the_content()), 1, get_the_content().length)
感谢很多提前:)
任何人都知道如何仅在wordpress中排除get_the_content()函数的第一个字母?从get_the_content()wordpress函数中排除句子的第一个字母
可能是这样的片段,但它不起作用!
substr(strip_tags(get_the_content()), 1, get_the_content().length)
感谢很多提前:)
你并不需要第三个参数,只写:
substr(strip_tags(get_the_content()), 1)
你可能在寻找这样的事情
$content = get_the_content();
$content = strip_tags($content);
$content = substr($content, 1, strlen($content));
你几乎有它。只需要使用strlen()函数来获取字符串的长度。
http://php.net/strlen – 2010-10-26 08:54:28
参考文献:[PHP字符串函数(http://www.php.net/手动/ EN/ref.strings.php) – 2010-10-26 09:02:31