Title: Using a pattern in a template
Last modified: September 1, 2024

---

# Using a pattern in a template

 *  Resolved [Emily Rapport](https://wordpress.org/support/users/eatpaintchic/)
 * (@eatpaintchic)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/using-a-pattern-in-a-template/)
 * Hello, I wanted to create a pattern for social sharing links which I could use
   on all single posts via template. But – when I do this it shares the name of 
   the pattern and not the current post. I am using a hybrid theme. Is it an issue
   with not using a block theme or just something I can’t do right now? Thanks!

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

 *  Plugin Author [Nick Diego](https://wordpress.org/support/users/ndiego/)
 * (@ndiego)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/using-a-pattern-in-a-template/#post-17988396)
 * Hi [@eatpaintchic](https://wordpress.org/support/users/eatpaintchic/),
 * I just tested adding a Social Sharing Block to a pattern in the Twenty Twenty-
   Four theme. Then I added the pattern to the posts template and the links share
   the current post as expected. I tested using WordPress 6.6.
 * Can you share a bit more about your setup, such as the WordPress version? If 
   you are able to share the theme, that would be helpful as well.
 * Thanks, 
   Nick
 *  Thread Starter [Emily Rapport](https://wordpress.org/support/users/eatpaintchic/)
 * (@eatpaintchic)
 * [1 year, 9 months ago](https://wordpress.org/support/topic/using-a-pattern-in-a-template/#post-17988437)
 * Thanks for your reply Nick, I am using a custom hybrid theme based on Underscores.
   I just tested this again and I think the issue was all me. I have a function 
   that will allow me to generate a shortcode for a pattern so I can use it in a
   php template. I just tried it again as a general template (not a pattern) and
   called that in my php file using block_template_part(‘single-social-share’) –
   this method worked as expected. I think my shortcode to display a synced pattern
   is doing something else to the content of the blocks… but I’m not sure what (
   yet)…

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

The topic ‘Using a pattern in a template’ is closed to new replies.

 * ![](https://ps.w.org/social-sharing-block/assets/icon-256x256.png?rev=3106087)
 * [Social Sharing Block](https://wordpress.org/plugins/social-sharing-block/)
 * [Support Threads](https://wordpress.org/support/plugin/social-sharing-block/)
 * [Active Topics](https://wordpress.org/support/plugin/social-sharing-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/social-sharing-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/social-sharing-block/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Emily Rapport](https://wordpress.org/support/users/eatpaintchic/)
 * Last activity: [1 year, 9 months ago](https://wordpress.org/support/topic/using-a-pattern-in-a-template/#post-17988437)
 * Status: resolved