Title: Add permalink to pattern
Last modified: September 12, 2022

---

# Add permalink to pattern

 *  [tonyanglesey](https://wordpress.org/support/users/tonyanglesey/)
 * (@tonyanglesey)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/add-permalink-to-pattern/)
 * I am trying o add just the permalink or post slug to a pattern, is there a way
   to do this with a `<!-- wp:post-` code?
 * I need this in a simple href for social sharing like this:
    `<a href="https://
   www.facebook.com/sharer.php?u=" target="_blank">` .
 * Thank you in advance!
    -  This topic was modified 3 years, 8 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).

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

 *  Moderator [threadi](https://wordpress.org/support/users/threadi/)
 * (@threadi)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/add-permalink-to-pattern/#post-16002628)
 * So you want to add your own social sharing link to pages? Why don’t you use plugins
   like [https://wordpress.org/plugins/ultimate-social-media-icons/](https://wordpress.org/plugins/ultimate-social-media-icons/)?
   Because you need to set more than just the HTML tag, but also a specific link.
   If you want to do without plugins, this would only be possible with your own 
   PHP programming.
 *  Thread Starter [tonyanglesey](https://wordpress.org/support/users/tonyanglesey/)
 * (@tonyanglesey)
 * [3 years, 8 months ago](https://wordpress.org/support/topic/add-permalink-to-pattern/#post-16002722)
 * [@threadi](https://wordpress.org/support/users/threadi/) yeah, I was hoping there
   was an `wp:` code for that – similar to `wp:post-title {"isLink":true}`, I can
   do this php in the pattern file somehow. Trying to avoid a plugin, or I can make
   my own I guess.
 * Thanks!

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

The topic ‘Add permalink to pattern’ is closed to new replies.

## Tags

 * [permalink](https://wordpress.org/support/topic-tag/permalink/)
 * [slug](https://wordpress.org/support/topic-tag/slug/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [tonyanglesey](https://wordpress.org/support/users/tonyanglesey/)
 * Last activity: [3 years, 8 months ago](https://wordpress.org/support/topic/add-permalink-to-pattern/#post-16002722)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
