Ok, I’m definitely doing something wrong ??
When I use this secondary query, something weird happens. The URL in the address bar is https://juliabarry.com/webdesign/erin_trahan/erin-trahan/ but I get an error message that says “You tried going to https://juliabarry.com/webdesign/webdesign/erin_trahan/erin-trahan/, and it doesn’t exist. All is not lost! You can search for what you’re looking for.”
Here’s my post template code. Lemme know where I’m going wrong…
<?php
/*
Template Name Posts: ErinTrahan.com
*/
$args = array('post_type' => 'erin_trahan','post_count'=> 50);
$erin_query = new WP_Query($args); // Instantiates new WP_Query object for Erin Trahan Custom Post Type posts
get_header(); // Loads the header.php template. ?>
<?php do_atomic( 'before_content' ); // hatch_before_content ?>
<div id="content">
<?php do_atomic( 'open_content' ); // hatch_open_content ?>
<div class="hfeed">
<?php if ( $erin_query->have_posts() ): while ( $erin_query->have_posts() ): $erin_query->the_post(); ?>
<?php do_atomic( 'before_entry' ); // hatch_before_entry ?>
<div id="post-<?php the_ID(); ?>" class="<?php hybrid_entry_class(); ?>">
<?php do_atomic( 'open_entry' ); // hatch_open_entry ?>
<div class="post-content">
<?php if ( current_theme_supports( 'get-the-image' ) ) get_the_image( array( 'meta_key' => 'Thumbnail', 'size' => 'single-thumbnail', 'link_to_post' => false, 'image_class' => 'featured', 'attachment' => false, 'width' => 640, 'height' => 360, 'default_image' => get_template_directory_uri() . '/images/single_image_placeholder.png' ) ); ?>
<div class="post-aside">
<?php echo apply_atomic_shortcode( 'entry_title', '[entry-title permalink="0"]' ); ?>
<?php echo apply_atomic_shortcode( 'byline_date', '<div class="byline byline-date">' . __( '[entry-published before="Date: "]', 'hatch' ) . '</div>' ); ?>
<?php the_field('project_url'); ?>
<?php echo apply_atomic_shortcode( 'byline_category', '<div class="byline byline-ategory">' . __( 'Category: [entry-terms taxonomy="category"]', 'hatch' ) . '</div>' ); ?>
<?php echo apply_atomic_shortcode( 'entry_meta', '<div class="entry-meta">' . __( '[entry-terms taxonomy="post_tag" before="Tags: "]', 'hatch' ) . '</div>' ); ?>
<?php the_field('project_description'); ?>
<?php echo apply_atomic_shortcode( 'byline_edit', '<div class="byline byline-edit">' . __( '[entry-edit-link]', 'hatch' ) . '</div>' ); ?>
<?php get_template_part( 'loop-nav' ); // Loads the loop-nav.php template. ?>
</div>
<div class="entry-content">
<?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'hatch' ) ); ?>
<?php wp_link_pages( array( 'before' => '<p class="page-links">' . __( 'Pages:', 'hatch' ), 'after' => '</p>' ) ); ?>
</div><!-- .entry-content -->
<?php do_atomic( 'close_entry' ); // hatch_close_entry ?>
</div><!-- .post-content -->
</div><!-- .hentry -->
<?php do_atomic( 'after_entry' ); // hatch_after_entry ?>
<!-- ========== ///// BEGIN IMAGE GRID ========== -->
<?php query_posts('category_name=ErinTrahan&posts_per_page=10'); ?>
<div id="project-images">
<?php while (have_posts()) : the_post(); ?>
<div class="left highlight">
<a href="https://juliabarry.com" title="<?php the_field( 'image_title' ); ?>"><img src="<?php the_field( 'project_image' ); ?>" alt="<?php the_field( 'image_alt_info' ); ?>" width="290"></a>
</div>
<?php endwhile;?>
</div>
<!-- ========== END IMAGE GRID \\\\\ ========== -->
<?php do_atomic( 'after_singular' ); // hatch_after_singular ?>
<?php endwhile; ?>
<?php endif; ?>
</div><!-- .hfeed -->
<?php do_atomic( 'close_content' ); // hatch_close_content ?>
</div><!-- #content -->
<?php do_atomic( 'after_content' ); // hatch_after_content ?>
<?php get_footer(); // Loads the footer.php template. ?>
Thanks!!