Support » Fixing WordPress » the_content(); Not Showing When Logged In

  • Pretty much as the title explains.

    If I’m logged into my admin, and then view my site, the pages which have specific templates that have the_content(); among other code I’ve put in the page, shows everything except for the the_content();

    HOWEVER if I log out of admin and view it like a regular user, then the_content(); shows.

    Any suggestions? It’s getting frustrating I need to constantly log in and out.

    Thanks!
    Matt

Viewing 6 replies - 1 through 6 (of 6 total)
  • Sounds like there’s an issue in your custom template files based on is_user_logged_in or similar.

    Thread Starter Matt Blank

    (@mattblank)

    My template simply consists of this though, and nothing shows in the_content area. What file do I need to look at?:

    <?php
    /*
    Template Name: Contact
    */
    
    get_header(); ?>
    
    <div id="left">
    
    		<h1 class="maintitle"><?php the_title(); ?></h1>
    
    		<?php the_content(); ?>
    
    </div> <!-- end of left -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    If that’s the code for your custom template, then why would the page(s) display anything other than the_content()? What else are you doing?

    After get_header() put this…

    the_post();
    Thread Starter Matt Blank

    (@mattblank)

    There was some blurb in there, but I took it out just to show the skin and bones of the template 🙂

    wpcanyon you’ve solved it!! 🙂 Thanks so much.

    Matt

    You’re welcome 🙂

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘the_content(); Not Showing When Logged In’ is closed to new replies.