• Resolved flur

    (@flur)


    Hi everyone,

    Been customizing index.php of my theme and suddenly realised the content is not showing when logged out.
    Everything’s fine while i’m logged in but when i log out all the posts content disapears. everything else is visible and fine, only the posts content is missing.

    Here’s what i mean:

    http://www.flur.pt/blog/

    And this is the current state of my index.php, anything here that might be causing this problem? thank you in advance!

    ——————

    <?php get_header(); ?>
    
    	<div id="content">
    	<?php if (have_posts()) : ?>
    
    		<?php while (have_posts()) : the_post(); ?>
    
    <div class="post">
    
    <b><?php the_time('l, j F, Y') ?></b>
    
    <?php if ( $user_ID ) : ?>
    
    				<h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1>
    <small>
    				<?php the_content('Read the rest of this entry &raquo;'); ?> <br>
    
    <b>/ / Editar:</b> <?php edit_post_link(); ?> <?php endif; ?> <b>/ / Comentar:</b> <?php comments_popup_link('aqui »', 'Um comentário »', '% Comentários »'); ?> <?php the_tags('/ / Etiquetas: ', ', ', ''); ?></small>
    
    			 <hr/>
    
    		</div>
    
    		<?php comments_template(); ?>
    
    		<?php endwhile; ?>
    
    		<div class="navigation">
    			<div class="alignleft"><?php next_posts_link('&laquo; Conteúdos Mais Antigos') ?></div>
    			<div class="alignright"><?php previous_posts_link('Conteúdos Mais Recentes &raquo;') ?></div>
    		</div>
    
    	<?php else : ?>
    
    		<h2 class="center"></h2>
    		<p class="center">Conteúdo não encontrado.</p>
    
    	<?php endif; ?>
    
    	</div>
    
    <?php get_sidebar(); ?>
    
    <?php get_footer(); ?>
Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter flur

    (@flur)

    This might help zone in:
    I specifically worked around lines 10 to 18, didn’t mess with anything else.

    Try re-uploading a fresh copy of your theme.

    Thread Starter flur

    (@flur)

    Ouch… I’ve altered so much already and don’t have a recent backup, do you think there’s no other way around it? Thanks.

    Thread Starter flur

    (@flur)

    OK, been banging my head, it’s resolved. Apparently it was the misplacing of this line
    <?php if ( $user_ID ) : ?>

    It was placed before the content but apparently it has to appear AFTER the content.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Content not showing when logged out’ is closed to new replies.