exclude the first letter of a sentence from get_the_content() wordpress function
Anybody know how can I exclude only the first letter of a get_the_content() function in wordpress?
could be a snippet like that, but it doesn't work!
substr(strip_tags(get_t开发者_如何学Pythonhe_content()), 1, get_the_content().length)
thanks a lot in advance :)
You don't need the third parameter, just write:
substr(strip_tags(get_the_content()), 1)
You're probably looking for something like this
$content = get_the_content();
$content = strip_tags($content);
$content = substr($content, 1, strlen($content));
You pretty much had it. Just needed to use the strlen() function to get the length of the string.
精彩评论