Beiträge in meinem Blog doppelt

  • Hallo an alle,

    die Beiträge im Blog werden mir doppelt angezeigt und ich finde es im Code nicht :oops:, kann mir da einer helfen, bitte ?

    <?php get_header(); ?>

    <div id="content-wrap" class="clear" >
    <div id="content">
    <!--the loop-->
    <?php if (have_posts()) : ?>
    <h1>
    <?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
    <?php /* If this is a category archive */ if (is_category()) { ?>
    <?php echo single_cat_title(); ?>
    <?php /* If this is a daily archive */ } elseif (is_day()) { ?>
    Archive for
    <?php the_time('F jS, Y'); ?>
    <?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
    Archive for
    <?php the_time('F, Y'); ?>
    <?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
    Archive for
    <?php the_time('Y'); ?>
    <?php /* If this is a search */ } elseif (is_search()) { ?>
    Search Results
    <?php /* If this is an author archive */ } elseif (is_author()) { ?>
    Author Archive
    <?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
    Blog Archives
    <!--do not delete-->
    <?php } ?>
    </h1>
    <!--loop article begin-->
    <?php while (have_posts()) : the_post(); ?>
    <!--post title as a link-->
    <div class="posts">

    <h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    <?php the_title(); ?>
    </a></h3>
    <div class="post_top">
    <span class="auth"> Posted by
    <?php the_author_posts_link(); ?>
    </span> <span class="date"><?php the_time('j M, Y') ?></span> </div>
    <!--optional excerpt or automatic excerpt of the post-->
    <?php the_excerpt(); ?>
    <!--read more-->
    <?php the_content('Read More >>'); ?>
    <!--Post Meta-->

    <!--Rateing-->
    <?php if(function_exists('the_ratings')) { the_ratings(); } ?>
    <!--Rateing end-->

    <div class="post_bottom"> <span class="commentp">
    <?php comments_popup_link('(0) Comment', '(1) Comment', '(%) Comment'); ?>
    </span> <span class="cate">Categories :
    <?php the_category(', ') ?>
    </span> </div>
    </div>
    <!--one post end-->
    <?php endwhile; ?>
    <!-- Previous/Next page navigation -->


    <div class="pagenavi">
    <?php if(function_exists('wp_pagenavi')) { ?>
    <div class="wp-pagenavi">
    <?php wp_pagenavi(); ?>
    </div>
    <?php }

    else {?>
    <div class="page-nav">
    <div class="nav-previous">
    <?php previous_posts_link('Previous Page') ?>
    </div>
    <div class="nav-next">
    <?php next_posts_link('Next Page') ?>
    </div>
    </div>
    <? } ?>
    </div><!--page navi end -->

    <!-- do not delete-->
    <?php else : ?>
    <h3>Sorry, no posts matched your criteria.</h3>
    <p>Please try searching again here...</p>
    <div class="search404">
    <?php include(TEMPLATEPATH."/searchform.php");?>
    </div>
    <p class="clear"><strong>Or, take a look at Archives and Categories</strong></p>

    <div class="category">
    <h2><?php _e('Category'); ?></h2>
    <ul>
    <?php wp_list_categories('orderby=name&title_li'); ?>
    </ul>
    </div>

    <div class="archives">
    <h2 class="sidebartitle">
    <?php _e('Archives'); ?>
    </h2>
    <ul>
    <?php wp_get_archives('type=monthly'); ?>
    </ul>
    </div>
    <!--do not delete-->
    <?php endif; ?>
    <!--archive.php end-->
    </div>
    <!--include sidebar-->
    <?php get_sidebar();?>
    <!--include footer-->
    <?php get_footer(); ?>

    • Anzeige

    Hallo!

    Wenn du gerade an deiner Website arbeitest oder dein aktuelles Hosting überdenkst: Wir betreiben mit NetzLiving eine Hosting-Plattform, die speziell auf Performance, Sicherheit und einfache Verwaltung ausgelegt ist.

    • ✔️ Schnelle Ladezeiten (optimiert für WordPress & Co.)
    • ✔️ Deutsche Server & DSGVO-konform
    • ✔️ Persönlicher Support (kein 0815-Ticket-System)

    Mehr erfahren

  • Bitte formatiere den geposteten Code mit den entsprechenden Buttons beim posten deiner Frage! Einfach der Lesbarkeit wegen ...

    An dem geposteten Code liegt es übrigens nicht.

    "Whoever controls the media, controls the mind." J.Morrison

  • PHP
    <?php the_excerpt(); ?>
          <!--read more-->
          <?php the_content('Read More >>'); ?>

    Eins von beiden sollte reichen, entweder the_excerpt oder the_content, so ist es natürlich doppelt.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!