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

Brandon Powell
Brandon Powell
663 Points

One-Page Wordpress

I'm working on One Page site on wordpress him some trouble trying added all my custom page on front-page of the site. I have looked at the One-Page Video on treehouse and now trying to change up the but the code have modify not working for me. Can someone help me please also here a screenshot where the folder at https://gyazo.com/dc4815bec6853c505bdf834a2e355b70

<?php /**

  • Template Name: Home-Page */

get_header(); ?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

            <?php 
               $args - array(
                   'post_type' => 'page',
                   'order' => 'ASC'
               );
               $the_query = new WP_Query( args );
            ?>


            <?php if($query-> have_posts() ) : while( $query->have_posts() ) : $query->the_post(); ?>
                <?php get_template_part('templates/', 'header'); ?>
                <?php get_template_part('templates/', 'page-about'); ?>
                <?php get_template_part('templates/', 'page-services'); ?>
                <?php get_template_part('templates/', 'page-portfolio'); ?>
                <?php get_template_part('templates/', 'page-contact'); ?>
                <?php get_template_part('templates/', 'footer'); ?>
            <?php endwhile; endif; ?>

    </main><!-- #main -->
</div><!-- #primary -->

<?php get_footer();

What kind of errors are you getting with that code? Does anything load at all?

1 Answer

Brandon Powell
Brandon Powell
663 Points

@MarkTruitt I'm not getting no error at all with the code if you want I can Skype call you and screen share.