Title: Help with code
Last modified: August 20, 2016

---

# Help with code

 *  Resolved [aarron81](https://wordpress.org/support/users/aarron81/)
 * (@aarron81)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/help-with-code-9/)
 * Hi All
 * I am just working on my first wordpress website and got into a little trouble.
 * I am using custom post types for media releases and a custom archive page to 
   call the media release title and issuer and link them both to the post.
 * The custom post type is working perfectly and so is the archive page with one
   small problem, the first title the archive page pulls is not linked, however 
   each subsequent title and issuer is. Is there something I have missed from the
   following code?
 * Cheers
 *     ```
       <?php
        $query = new WP_Query( array( 'post_type' => array( 'media_releases' ) ) );
   
       while ( $query->have_posts() ) : $query->the_post();
       	echo '
       	<table><tr><td><a href="';
       	the_permalink();
       	echo '">';
       	the_title();
       	echo '</a></td>'; ?>
   
       	<td>
       <a href="<?php the_permalink(); ?>">
       <?php $terms_as_text = get_the_term_list( $post->ID, 'issuer', '', ', ', '' ) ; ?>
       	<?php echo strip_tags($terms_as_text); ?></a></td></tr></table>
   
       <?php endwhile; ?>
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/help-with-code-9/#post-3519855)
 * might be a css problem with some layer covering the link;
 * please post a live link to the problem site
 *  Thread Starter [aarron81](https://wordpress.org/support/users/aarron81/)
 * (@aarron81)
 * [13 years, 3 months ago](https://wordpress.org/support/topic/help-with-code-9/#post-3519857)
 * Thanks for the respose alchymyth
 * The site is on my local machine, so cannot post a link.
 * I have been playing around and comparing the archive to the default archive file
   and was missing out the following:
 *     ```
       <?php the_post(); ?>
       		<div id="post-<?php the_ID() ?>" class="post">
       			<h1 class="post-title"><?php the_title() ?></h1>
       ```
   
 * By adding that in, all works correctly.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Help with code’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [aarron81](https://wordpress.org/support/users/aarron81/)
 * Last activity: [13 years, 3 months ago](https://wordpress.org/support/topic/help-with-code-9/#post-3519857)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
