If your WP website is blank here’s some notes:
- when developing a new theme, always make sure
DEBUG is on in wp-config.php, this will print PHP errors and guide you to the line of the error(s).. if that doesn’t do anything, try adding error_reporting(E_ALL); ini_set('display_errors', 1); into wp-config.php it *should* also tell you if it’s an issue or conflict with a plugin
- check the source code, see if there’s header and footer content, if there is the issue is with a index/page file, not footer/functions/header/etc.
- if you’re able to log into
/wp-admin/ and see things, it’s for sure a a PHP error
(PS. I’ve had white-screens-of-death from upgrades too (corrupt file), so keep that in mind if you upgraded immediately prior to this issue).
Thread Starter
NVM
(@nvm-1)
@davidsword – thank you for reply!
I didn’t know about Debugging in WordPress, thanks! The wp-admin works like a charm, and I found the cause of my troubles.
In the page.php just add a condition to checking post (erm, I was confused, because I was sure posts are not the same as pages, but anyway…) and then get a content.
For others:
if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>">
<?php if ( ! is_front_page() ) { ?>
<h2 class="entry-title"></h2>
<?php } ?>
<section class="entry-content">
<?php the_content(); ?>
</section><!-- .entry-content -->
</article>
<?php endwhile; ?>
and now all works fine. I just forgot about the Worpdress loop and wonder why it not works 😀