• Resolved FunnyBunnyHelena

    (@funnybunnyhelena)


    Updated to 3.7.
    The posts on main page are gone.
    I use a custom theme that is ancient. I do not know much about php, I am sorry.

    I have disabled plugins, still problem.
    Then I changed to default theme, and then I understood it is the theme that is problematic.

    I tried to compare with default theme but it is so radically different so I gave up because I simply am not well versed in php..

    Please look at my site:
    https://www.funnybunny.se

    and the code for the post section is here:

    <!-- Begin .post -->
    
    <?php $found=0; ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php if (in_category(0) && !$single) { $found=1; ?>
    <?php } else { ?>
    
      <div class="post">
    
    <div><span style="float:left;" class="blog-date"><strong><?php the_time('F j, Y',display); ?></strong></span></div>
    
    <div style="clear: both;"></div>
    
      <div class="blog-title"><a href="<?php the_permalink() ?>" style="text-decoration:none;" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> <?php the_title(); ?></a>
        </div>
    	         <div >
    	<div>
    <!--        <?php if($post->post_excerpt) { ?>
    	<div class="post-excerpt"><?php the_excerpt(); ?></div>
            <?php } ?> -->
          <a href="<?php the_permalink() ?>" style="text-decoration:none; color:#333333 !important;" class="excerptlink" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_excerpt('Read more!'); ?></a>
        </div>
        </div>
    
    <?php comments_template(); // Get wp-comments.php template ?>
      </div>
    <br />
    
    <?php } ?>
    <?php endwhile; else: ?>
    <?php header("Location: https://www.funnybunny.se/wp-content/themes/funny_bunny/404.php"); ?>
    <?php endif; ?>
    
    <!-- End .post -->

    I hope you can help me here. Thank you so much.

Viewing 1 replies (of 1 total)
  • Thread Starter FunnyBunnyHelena

    (@funnybunnyhelena)

    My friend helped me there, she asked me to comment away a few lines.
    Then she will help me with update it so it functions better as a whole a further down the time, she is good at php!

    Now it works for the while, and if you are curious here is the code:

    <?php // <?php $found=0; ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
    <?php // <?php if (in_category(0) && !$single) { $found=1; ?>
    <?php // <?php } else { ?>
    
      <div class="post">
    
    <div><span style="float:left;" class="blog-date"><strong><?php the_time('F j, Y',display); ?></strong></span></div>
    
    <div style="clear: both;"></div>
    
      <div class="blog-title"><a href="<?php the_permalink() ?>" style="text-decoration:none;" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"> <?php the_title(); ?></a>
        </div>
    	         <div >
    	<div>
    <!--        <?php if($post->post_excerpt) { ?>
    	<div class="post-excerpt"><?php the_excerpt(); ?></div>
            <?php } ?> -->
          <a href="<?php the_permalink() ?>" style="text-decoration:none; color:#333333 !important;" class="excerptlink" rel="bookmark" title="Permanent Link: <?php the_title(); ?>"><?php the_excerpt('Read more!'); ?></a>
        </div>
        </div>
    
    <?php comments_template(); // Get wp-comments.php template ?>
      </div>
    <br />
    
    <?php // <?php } ?>
    <?php endwhile; else: ?>
    <?php header("Location: https://www.funnybunny.se/wp-content/themes/funny_bunny/404.php"); ?>
    <?php endif; ?>
Viewing 1 replies (of 1 total)
  • The topic ‘WP 3.7 update – posts are gone on the main page’ is closed to new replies.