Title: custom template problems
Last modified: August 21, 2016

---

# custom template problems

 *  [Waymond206](https://wordpress.org/support/users/waymond206/)
 * (@waymond206)
 * [12 years, 11 months ago](https://wordpress.org/support/topic/custom-template-problems/)
 * I am trying to make my “work” template work like my other links on my nav bar.
   Not too sure where I went wrong with my code but it isn’t showing the hr tag 
   and The title. Thanks for the help!
 *     ```
       <?php
       /*
   
       	Template Name: Work Page
   
       */
   
       get_header(); ?>
   
       <p> This is the work.php file </p>
   
       <?php 
   
       $args = array( 'post_type'=>'work' );
   
       $the_query = new WP_Query( $args );
   
       ?>
   
       <?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
   
        	<h3><a href="<?php the_permalink(); ?>" <?php $the_query->the_title(); ?></h3>
        	<?php the_content(); ?>
        	<hr>
   
       <?php endwhile; else: ?>
   
       <p> customize later </p>
   
       <?php endif; ?>
   
       <?php get_footer(); ?>
       ```
   

Viewing 1 replies (of 1 total)

 *  [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * (@vtxyzzy)
 * [12 years, 10 months ago](https://wordpress.org/support/topic/custom-template-problems/#post-3834060)
 * I think your ‘h3’ line should be this:
 *     ```
       <h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
       ```
   

Viewing 1 replies (of 1 total)

The topic ‘custom template problems’ is closed to new replies.

## Tags

 * [custom-template](https://wordpress.org/support/topic-tag/custom-template/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [vtxyzzy](https://wordpress.org/support/users/vtxyzzy/)
 * Last activity: [12 years, 10 months ago](https://wordpress.org/support/topic/custom-template-problems/#post-3834060)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
