Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • I had a problem where all my content was blank. I discovered it was only my handwritten theme- all others worked. I figured out that it was because I had a file called content-.php that was serving as the template part for pages. Note the HYPHEN before the dot. This used to work before 3.8, apparently due to a bug that has now been fixed in 3.8.

    The key appears to be the following line from the theme’s index.php:

    get_template_part( 'content', get_post_format() );

    It is supposed to use the PHP file named content- followed by the post format, to output the content. Since for my pages, get_post_format() returns the empty string, the filename of content-.php would work.

    Now as of 3.8, WordPress doesn’t apparently look for that file anymore, and get_template_part() just looks for content.php when the post format is empty. I suspect that the previous behavior was a bug, and that I somehow managed to come across it by (probably mistakenly) naming my template file with the extra hyphen in there. Since it worked, I didn’t have to fix what did not appear to be broken, until now.

    So the solution for me was simply to rename content-.php to content.php. Once I did that everything started working again.

    Thread Starter tomviolin

    (@tomviolin)

    My installation of IE does not have Javascript disabled, plus everything else seems to work. In addition, I have observed this on different computers with different versions of IE (I tried it with the IE7 beta even).

Viewing 2 replies - 1 through 2 (of 2 total)