Title: Error while parsing?
Last modified: August 19, 2016

---

# Error while parsing?

 *  [vigv](https://wordpress.org/support/users/vigv/)
 * (@vigv)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/error-while-parsing/)
 * Okay, well, I have decided to learn how to theme for WordPress and hence, been
   trying to build a simple index page as a start.
 * However, I seem to be facing a problem. When I type this out:
    `echo '<a href
   ="'.get_permalink().'">'.the_title().'</a><br />';` I get an output where the
   post title appears BEFORE the  tag when I view the source of the index page. 
   But when I type this out:
 *     ```
       echo '<a href="'.get_permalink().'">';
       			echo the_title();
       			echo '</a><br />';
       ```
   
 * It prints it out just perfectly.
 * Any idea what might be going wrong?

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

 *  [GRAQ](https://wordpress.org/support/users/graq/)
 * (@graq)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/error-while-parsing/#post-1971275)
 * I used to use [http://codex.wordpress.org/Function_Reference/get_the_title](http://codex.wordpress.org/Function_Reference/get_the_title)
 * But I think perhaps WP would like us to use [http://codex.wordpress.org/Function_Reference/the_title](http://codex.wordpress.org/Function_Reference/the_title)
   instead.
 * Try this:
 *     ```
       echo '<a href="'.get_permalink().'">'.the_title(,,false).'</a><br />';
       ```
   
 * Let me know if you need it explaining further.
 *  Thread Starter [vigv](https://wordpress.org/support/users/vigv/)
 * (@vigv)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/error-while-parsing/#post-1971565)
 * Sorry for the late reply, been caught up with some stuff at home.
    Yes, sure.
   I’ll try it as soon as I’m back from work. Thank you!

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

The topic ‘Error while parsing?’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [vigv](https://wordpress.org/support/users/vigv/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/error-while-parsing/#post-1971565)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
