When I set the 'posts for page' option to a specific page, then that page gets an empty header and the page is not structured.

The site has a customized theme of twenty eleven. Could someone point me into a direction of a possible solution?

How it should be: right display

NOTE: its not online visible, because of debugging services

  • 3
    Looks like you have some syntax error, otherwise the text above the image wouldn't be visible. – Nicolai May 27 '15 at 13:57
  • The errors shown in the console are no syntax errors. I have seen this before, but then it was caused by the css, this time not. I haven't yet found any syntax error. – MartijnregaJ May 27 '15 at 13:58
  • Is this a custom theme? If so, have a look at the template page where that comment is supposed to be and check it is correct? – Aravona May 27 '15 at 14:02
  • As far as I have seen nothing changes if the option is used or not – MartijnregaJ May 27 '15 at 14:13

It seems to be missing the opening <?php or else that text shouldn't be readable above the image. The file seems to be using index.php but it's possible depending on your theme setup that it's a different file missing the <?php. Therefore, get_header() is not filling the header at all, because it's displaying as HTML instead of acting as PHP.

| improve this answer | |
  • In the code, <?php is there at the beginning in most files, haven't yet checked them all. If I do not set the 'posts for page' option, the get_header() function is working normal. – MartijnregaJ May 27 '15 at 14:29
  • Have you checked index.php? <?php needs to go in the index.php (or whatever page is creating that output) right before that extra text displaying at the top of your screenshot. It's possible that <?php is there but is followed by a ?> which is closing the php section. You need to be sure <?php is open right before those comments and the get_header() call. – ambroseya May 27 '15 at 14:34
  • Specifically this will only be in the theme php files (or child theme if it's a child theme) and not anywhere else in WP. – ambroseya May 27 '15 at 14:35
  • I hadn't checked the index.php yet. I wanted to check that file as last, but WordPress turned the <?php into something else in that file. For now it seems to be the solution. Thanks a lot Ambroseya. – MartijnregaJ May 27 '15 at 14:43

Not the answer you're looking for? Browse other questions tagged or ask your own question.