I'm encountering a really strange problem:
If I call a single custom post type, I get a "Call to undefined function get_header()" in a custom page template, which shouldn't be rendered at all for this single post ...
- A custom post type named "portfolio" with
'rewrite' => true.
- A custom page template
portfolio.php, which has a loop for all 'portfolio'-posts and is the front page.
single-portfolio.phpto display the portfolio post type.
In my local environment (which uses beside the db-settings in wp-config.php the identical files like the server where the problem occurs) the permalinks for single portfolio posts are working.
On the server the whole website is working as supposed to. Except: If I'm calling a single portfolio post, i get a
Call to undefined function get_header() in
portfolio.php, the custom page template, which shouldn't be rendered at all for showing this single post ...
I don't actually have a clue, where I should start looking. Especially as it's working on the local environment.