Title: Current post template tags
Last modified: August 19, 2016

---

# Current post template tags

 *  [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * (@erick_paper)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/current-post-template-tags/)
 * I am looking for making my single post template.
 * Inside the loop, I want to have:
 * 1. The title
    2. The current post’s slug 3. The previous link in the same category,
   but I want the title and link separately 4. The next post in the same category,
   with title and link separate
 * The code for 1 works, it’s `get_the_title()`.
 * The code for 2 – there seems to be no tag, so I myself try to do `strtolower`
   and `str_replace` of the title. Is there an easier way? Why can’t I access the
   current post’s slug?
 * The code for 3 and 4 – “previous_post_link” only seems to want to give the entire
   link with A HREF and all. How can I make it give me only the link and title of
   the previous and next posts separately to use in my own code (because I need 
   to put a <A CLASS=””) in there.
 * Thanks!

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

 *  Thread Starter [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * (@erick_paper)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/current-post-template-tags/#post-847378)
 * Anyone has any idea about this?
 *  Thread Starter [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * (@erick_paper)
 * [17 years, 8 months ago](https://wordpress.org/support/topic/current-post-template-tags/#post-847544)
 * Is this not possible then? Does WP only offer the messy previous_post_link() 
   tags and not separate items of the previous post???

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

The topic ‘Current post template tags’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 1 participant
 * Last reply from: [erick_paper](https://wordpress.org/support/users/erick_paper/)
 * Last activity: [17 years, 8 months ago](https://wordpress.org/support/topic/current-post-template-tags/#post-847544)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
