I have a custom post type and need to display it in a certain way. I would like other posts to display as normal. When I tried to use the following code to accomplish this, I get a 500 Internal Server Error.
global $post;
//do this only for custom type
if (!(get_post_type()=='customt'))
{
$rawContent = $post->post_content;
$formattedContent = apply_filters('the_content',$rawContent);
echo $formattedContent;
return;
}
I have googled around and found a lot of things regarding .htaccess but I don't think that is the case here. If I comment out the apply filters line ($formattedContent =...) and echo raw content, the post displays, but without formatting of course.
What am I doing wrong when I am trying to apply a filter?