0

Hi, i have started learning how to build wordpress themes and have a problem with the code below
Please can you help me to find where the problem is? Thank You!

    <?php  get_header(); ?>

                <section class="container layout">

                    <section class="page_title">
                        <div class="title">Blog style 1</div>
                        <div class="slogan">Curabitur ultrices ultricies justo</div>
                    </section>
                    <div class="clear"></div>

                    <section class="grid_8">
                        <section id="blog">
                       <?php if(have_posts()) : while(have_posts()) : the_post(); ?>
                            <!--============= ARTICLE BEGIN ===========-->

                            <article class="style1">
                                <div class="grid_3 img_pf_hover alpha"><a href="blog_post.html"><img src="<?php bloginfo('template_directory') ?>/images/assets/5.png" class="img212x142" alt="" /></a></div>
                                <!-- Article thumbnail end -->

                                <div class="grid_5 omega">
                                    <div class="title"><h2><a href="blog_post.html">Qudos volutpat mattis tincidunt</a></h2></div>
                                    <div class="clear"></div>
                                    <div class="meta_data">Posted by <a href="#">Smartik</a> on October 11, 2011 in <a href="#">Web Design</a> category</div>
                                    <div class="clear"></div>

                                    <p>Donec eleifend pretium nunc. Vestibulum ac tortor ut nisi hendrerit tincidunt quis in felis. Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae; Etiam fermentum semper ligula ac bibendum...</p>
                                    <div class="clear"></div><!-- Article description end -->
                                </div>
                                <div class="clear"></div>
                            </article>
                            <div class="clear"></div>
                            <!--============= ARTICLE END ===========-->


                        </section> <!-- End #blog -->
                    </section>
                    <?php get_sidebar(); ?>
                </section> <!-- End section .container layout -->

                <?php get_footer(); ?>
            </section><!-- End section .wrap_block -->
        </section> <!-- End section #wrap -->
3
Contributors
4
Replies
5
Views
5 Years
Discussion Span
Last Post by mig_kapa
0

Urgh, haven't done any work with Wordpress in a while (Because it's just quite frankly horrible to work with)
BUT, from looking at your code, you open up an if statement, as well a while loop. Where do you close these? so e.g.

<?php

   endif();
   endwhile();

?>

I think the code is, but I'm not too sure.. This is why you could be getting the $end

1

phorce is correct but they should be the other way around:

<?php

endwhile;

endif;

?>

You are also missing your semi-colon after calling the template_directory

0

@simplypixie - My bad, I haven't done anyt wordpress in about a year. I refused to learn it!

0

Thank you guys/ The problem was just closing the loop with <?php endwhile; ?>

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.