views:

28

answers:

2

hello!

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_the_content()), 1, get_the_content().length)

thanks a lot in advance :)

+2  A: 

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.

mellowsoon
+3  A: 

You don't need the third parameter, just write:

substr(strip_tags(get_the_content()), 1)
Wille