Title: Insert permalink in a code function
Last modified: August 18, 2016

---

# Insert permalink in a code function

 *  [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/insert-permalink-in-a-code-function/)
 * I have this function:
 * `<?php 
    if(!$post->post_excerpt) { the_content(); } else { the_excerpt(); } ?
   >
 * How can i insert permalink in the_excerpt ? I try to modify
 * `<a href="the_permalink()" rel="bookmark">the_excerpt()</a>;`
 * but i receive an error

Viewing 1 replies (of 1 total)

 *  Thread Starter [Marcomail](https://wordpress.org/support/users/marcomail/)
 * (@marcomail)
 * [19 years, 9 months ago](https://wordpress.org/support/topic/insert-permalink-in-a-code-function/#post-427643)
 * helppp

Viewing 1 replies (of 1 total)

The topic ‘Insert permalink in a code function’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 1 participant
 * Last reply from: [Marcomail](https://wordpress.org/support/users/marcomail/)
 * Last activity: [19 years, 9 months ago](https://wordpress.org/support/topic/insert-permalink-in-a-code-function/#post-427643)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
