WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I can't get the page content to appear in my custom wordpress theme.

I have an extremely simple version of The Loop, which should just display the title and the content of the current page or posts. It doesn't use a query, or any modification, but the only page it works on is the Homepage. I set up the settings correctly (Front page displays: a static page). (Edit: if I change the page selected as the home page, it shows the correct content, but no other pages show their content regardless)

My static front page is the only page that works. The Posts page I selected doesn't work, and neither do any of the other pages. The navigation is a proper wordpress nav, so the links must are correct, but every time the loop just fails and I get my 'else' text (Sorry no posts to list).

I'm really at my wits end here, i've been fighting this all day and still have no solution. I feared I was doing something wrong so began copy-pasting different versions of the loop in, none of which will show my content!? Am I just missing something really stupid here? I'm going crazy!

Any help will be hugely appreciated, Thanks!


get_template_part('template', 'twitter');


    <div class="content">
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        <h2><?php the_title() ;?></h2>
        <?php the_content(); ?>
    <?php endwhile; else: ?>
        <p>Sorry, no posts to list</p>
    <?php endif; ?>

(Some background for anyone thats interested: I was setting up a Slider looping through my Custom Post Type BEFORE my proper content loop. Content loop worked fine, added slider, content loop starts only showing 'Home' on every single page. So now i've disabled the slider in the hope of getting my main loop working, but now it won't load any page!)

Clarification: The slider IS now removed, but below is the code for it anyway

<?php $customquery = new WP_Query('post_type=slideshow'); ?>
<div class="slider">
<?php while($customquery->have_posts()) : $customquery->the_post(); ?>
<ul class="bxslider slides">
    <?php if(has_post_thumbnail()) { ?>
        <?php $imgurl = wp_get_attachment_image_src( get_post_thumbnail_id(), 'slider-large'); ?>
        <li style="background-image:url(<?php echo $imgurl[0]; ?>);"><?php the_content(); ?></li>
    <?php } else { ?>
        <li><?php the_content(); ?></li>
    <?php } ?>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php wp_reset_query(); ?>
share|improve this question
Do you have debugging information? – s_ha_dum Jul 17 '13 at 15:09
@s_ha_dum I just turned it on in the config, as well as logging, and no log files have appeared nor any errors. Is there anything specific I should be doing to get debug information? never had to do it before – Tom H Jul 17 '13 at 15:34
I don't see anything obviously wrong. Comment out parts of your code and try to isolate the problem. – s_ha_dum Jul 17 '13 at 15:40
I'd recommend installing the Debug Bar plugin and checking out the WP Query tab. Like this you can see what kind of query WordPress runs on this page. – Fränk Jul 17 '13 at 15:55
Okay i've got it.. Apparently my permalinks don't work unless they're set to Default, none of the other settings work... So my page content shows now :) now how do I get my pretty permalinks back :( – Tom H Jul 17 '13 at 15:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.