Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress From Bootstrap to WordPress Create Bootstrap Styled Theme Templates Creating a static front page

Problem with creating a static front page

I'm following along From Bootstrap to wordpress using my own website, and when I put in the following code:

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                <?php the_content(); ?>

            <?php endwhile; endif; ?>

in my front-page.php file, everything that comes after the code does not appear when the page is live. Can someone help me with this problem?

2 Answers

Can you show the rest of your code for the page? It will help us understand what you've got going on.

<?php get_header(); ?>

    <div class="header-image">
        <a href="index.html"><img src="<?php bloginfo('stylesheet_directory'); ?>/img/katbo-header-pic-9.png" alt="KatBo Web Design Logo"></a>

    </div><!-- /.header-image -->

</header>


<section id="kb-intro" data-speed="4" data-type="background">       
    <div class="container">
        <div class="row" id="row1">

            <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

                <?php the_content(); ?>

            <?php endwhile; endif; ?>

        </div>
    </div>
</section>

<section id="kb-main" data-speed="2" data-type="background">
    <div id="hp-main">
        <div class="container" id="textBox">
            <div class="base">
                <div id="row2" class="row">
                    <div class="col-sm-5 flex-wrap col">

                        <h2>“How does it look?”</h2>
                        <div class="icon fa fa-star-o fa-2x"></div>
                        <div class="image img-form">

                        </div>
                    </div>
                    <div class="col-sm-7 col">
                        <p><span class="lead-word">Form</span>, or how the web site looks, is the first thing that a visitor 
        notices. Here, you have an opportunity to make a good first 
        impression or a poor one. We, at KatBo Web Design, put in that 
        extra time and energy to make your website look just right. 
                        </p>
                        <p>
        We start with mock-ups of possible design layouts made in 
        PhotoShop.(This, in part, is for your perusal. We want you to have 
        a say in how you will be presented from the beginning.) Then, we 
        continue with best practices in CSS 3, the most recent version of 
        CSS. With the help of the innovative features in CSS 3, we will be 
        able to format your web pages to look picture perfect. 
                        </p>
                        <p>
        In our more recent creations, we have incorporated the concepts 
        of responsive web design. This means that the format of your 
        website will change to adapt to the screen size of your device, be it 
        desktop, laptop, tablet, or smartphone, for an optimal presentation 
        without sacrificing content.
                        </p>
                        <p>
        We also use stunning photographs and carefully chosen color 
        schemes to add the wow factor to your websites. All these tools 
        and tecniques are used to create eye-catching and harmonious 
        designs that will hook the visitor in and keep her on your site. 
                        </p>

                    </div>
                </div>
            </div>
                <div id="row3" class="row">  
                    <div class="col-sm-5">
                        <h2>“How does it work?”</h2>
                        <div class="icon fa fa-cogs fa-2x"></div>
                        <div class="image img-function">

                        </div>
                    </div>
                    <div class="col-sm-7">
                        <p><span class="lead-word">Function</span>, or how the website works, should be flawless. 
        Nothing will chase away a visitor faster than a website with 
        imperfect functionality. Pictures should load with good speed, 
        links should take you to their promised destinations, and the 
        information typed into the contact forms should be sent directly 
        to your email inboxes.
                        </p>
                        <p>
        We use the scripting languages PHP, from the server-side, and 
        Javscript, from the client-side to enable vital and exciting 
        functionalities, such as collecting form data and generating 
        dynamic page content. 
                        </p>
                        <p>
        Our preferred content management systems are Wordpress and 
        Joomla. They not only allow you to have access to your site’s 
        inner workings, but also help us to add functionalities to your 
        website through their plugins. Say you want to place a slideshow 
        on your homepage. There’s a plugin for that. Say you want to add 
        a shopping cart to you ecommerce site. There’s a plugin for that 
        too!
                        </p>
                        <p>
        As technologies evolve, there will be more and more functionalities 
        to choose from. Let us sift through the rubble and find you the 
        gems that will truly enhance your website.</p>
                    </div>
                </div>
                <div id="row4" class="row">  
                    <div class="col-sm-5">  
                        <h2><span class="lead-word">Content</span> is KING!”</h2>
                        <div class="icon fa fa-pencil-square-o fa-2x"></div>
                    </div>
                    <div class="col-sm-7">
                        <p>Form, function, and content -- out of these three aspects of a 
        website, content is the most important. Content is king! No matter 
        how beautiful your design or how amazing your functionality, if 
        your content is poor, your visitor won’t be won over. She’s not 
        going to buy your product, enlist your services, or take your advice. 
                        </p>
                        <p>
        So writing good content is the key. It’s the key to success in getting 
        your visitor to buy whatever it is that you are selling and it’s also 
        the key to getting a high ranking in the search engines, which drives 
        more traffic to your site.
                        </p>
                        <p>
        If you so desire, we can help in this area too. As long as we are 
        provided with the raw materials of what you want to say, we can help 
        you find your voice and help you write good content. 
                        </p>

                    </div>

                </div><!-- /.row -->
            </div><!-- /.container -->
        </div>
  </section>


</div><!-- /#wrap -->

<?php get_footer(); ?>