Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8440069
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T08:11:02+00:00 2026-06-10T08:11:02+00:00

I am kind of WordPress noob, but trying to implement my HTML/CSS theme into

  • 0

I am kind of WordPress noob, but trying to implement my HTML/CSS theme into WP, but I’ve stumbled upon a weird bug…everytime I add another post, the home.php page duplicates itself after the end of the page 😮
Here is the HTML/PHP code for my home.php which will be my main page:

<?php 
    get_header();
?>      
        <!-- WRAPPER START -->
        <section id="wrapper">
            <?php 
                if(have_posts()):
                    while(have_posts()):
                        the_post();
            ?>
            <!--  start dynamic part -->
            <!-- NEWS START -->

            <div id="slider">       
                <article>
                    <h2>
                        <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                    </h2>

                    <p class="m-post-info">
                        Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> on 
                        <?php the_date('d-m-Y'); ?> |
                         <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                    </p>

                    <div>
                        <?php the_content(); ?> 
                    </div>

                    <a id="arrow-left" href="#" title="Previous"></a>
                    <a id="arrow-right" href="#" title="Next"></a>
                </article>
            </div>

            <!-- NEWS END -->


            <!-- MAIN CONTENT START-->

            <section id="main-content">


                <!-- 3COLUMN LAYOUT START -->

                <div id="column-1">
                    <h3>
                        POPULAR ARTICLES
                    </h3>
                    <article class="news-article">
                        <header>
                            <h4>
                                 <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                            </h4>
                            <p class="post-info">
                                Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> in on <?php the_date('d-m-Y'); ?> |  <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                            </p>
                        </header>
                        <img src="<?php echo get_template_directory_uri() ?>/images/image-small.png" title="Riots" alt="Example Image 1" width="75" height="75" />
                        <div class="post-text">
                             <?php the_excerpt(); ?>
                        </div>
                    </article>
                    <article class="news-article">
                        <header>
                            <h4>
                                 <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                            </h4>
                            <p class="post-info">
                                Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> in on <?php the_date('d-m-Y'); ?> |  <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                            </p>
                        </header>
                        <img src="<?php echo get_template_directory_uri() ?>/images/image-small.png" title="Riots" alt="Example Image 1" width="75" height="75" />
                        <div class="post-text">
                             <?php the_excerpt(); ?>
                        </div>
                    </article>
                </div>

                <div id="column-2">
                    <h3>
                        RECENT COMMENTS
                    </h3>

                    <div class="comment">
                        <?php
                        $comments = get_comments('status=approve&number=3');
                          foreach($comments as $comment) :?>
                          <?php $my_id = $comment->comment_post_ID ; $post_id_comms = get_post($my_id); $title = $post_id_comms->post_title;?> 
                        <p class="user">
                            <?php echo($comment->comment_author);?> <span class="text-decoration">says</span><br />
                           </p>
                         <p class="user-text">
                            <?php echo($comment->comment_content);?><br />
                        </p>
                        <?php endforeach;?>
                    </div>
                </div>

                <div id="column-3">
                    <h3>
                        LIFESTREAM
                    </h3>
                    <article class="news-article">
                        <header>
                            <h4>
                                 <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                            </h4>
                            <p class="post-info">
                                Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> in on <?php the_date('d-m-Y'); ?> |  <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                            </p>
                        </header>
                        <img src="<?php echo get_template_directory_uri() ?>/images/image-small.png" title="Riots" alt="Example Image 1" width="75" height="75" />
                        <div class="post-text">
                             <?php the_excerpt(); ?>
                        </div>
                    </article>
                    <article class="news-article">
                        <header>
                            <h4>
                                 <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                            </h4>
                            <p class="post-info">
                                Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> in on <?php the_date('d-m-Y'); ?> |  <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                            </p>
                        </header>
                        <img src="<?php echo get_template_directory_uri() ?>/images/image-small.png" title="Riots" alt="Example Image 1" width="75" height="75" />
                        <div class="post-text">
                             <?php the_excerpt(); ?>
                        </div>
                    </article>
                </div>

                <!-- 3COLUMN LAYOUT END -->

                <!-- SIDEBAR START -->

                <aside id="tab-lists">
                    <?php if(!dynamic_sidebar('telerik-sidebar')): ?>
                    <div>
                        <h5 id="tab1">
                            <span>recent posts</span>
                        </h5>
                        <ul>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                        </ul>
                    </div>
                    <?php endif; ?>
                    <?php if(!dynamic_sidebar('telerik-sidebar2')): ?>
                    <div>
                        <h5 id="tab2">
                            <span>recent posts</span>
                        </h5>

                        <ul>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                            <li>
                                <a href="#">Pellentesque tincidunt, diam eget accumsan</a>
                            </li>
                        </ul>
                    </div>
                    <?php endif; ?>
                </aside>    

                <!-- SIDEBAR END -->

                <!-- BIG POST START -->
                <div id="big-post">
                    <h3>
                        RECENT POSTS
                    </h3>
                    <article>
                        <header>
                            <h2>
                                <a href="<?php the_permalink();?>"><?php the_title(); ?></a>
                            </h2>
                            <p class="post-info">
                                Posted by <a href="<?php the_permalink();?>"><?php the_author(); ?></a> in on <?php the_date('d-m-Y'); ?> | <a href="<?php the_permalink();?>"><?php comments_number( 'no comment', 'one comment', '% comments' ); ?></a>
                            </p>
                        </header>
                        <img src="<?php echo get_template_directory_uri() ?>/images/image-big.png" alt="Picture" title="Example Image 2" width="214" height="214" />
                        <div class="post-text">
                            <?php the_content(); ?>  
                        </div>
                    </article>
                </div>
                <!-- BIG POST END -->

            </section>

            <!-- MAIN CONTENT END -->
        <!-- END DYNAMIC PART -->
            <?php 
                endwhile;
                endif;
            ?>
        </section>

        <!-- WRAPPER END -->

<?php 
    get_footer();
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T08:11:04+00:00Added an answer on June 10, 2026 at 8:11 am

    You have got (almost) your whole page in the loop, so for each post it will repeat everything.
    Close the while after you want to end your posts, not at the end of our page.

    You need to stop it after: <!-- NEWS END -->

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Kind of a weird example, but here goes: How do I get an absolutely
I'm trying to integrate CKEditor into Wordpress for a client. I'm not too familiar
Is there a way to stop Wordpress from automatically inserting scripts into my theme
I have imported a Blogger account into a Wordpress installation. But suddenly I saw
I've been researching it a lot and trying it out but I'm kind of
Kind of a ruby-noob active record query question: Magazine has_many :subscriptions User has_many :subscriptions
What kind of WordPress function do you use to show the page contents? I
quick question here. Is there any Wordpress 3.0 documentation available? Some kind of list
I am trying to build a basic plugin system like the kind you often
I need to activate theme for wordpress blogs which are present remotely. I thought

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.