Title: Accessing variable, how?
Last modified: July 10, 2023

---

# Accessing variable, how?

 *  Resolved [oskar866](https://wordpress.org/support/users/oskar866/)
 * (@oskar866)
 * [2 years, 11 months ago](https://wordpress.org/support/topic/accessing-variable-how/)
 * Hi. Forgive me if I’m misunderstanding how Snippets works but I’m trying to make
   a simple snippet as per the attached image. It contains three lines of information,
   I wish to set a variable to each of the lines and then, in my WordPress page,
   add just one of the variables at the required place. I’ve included an image of
   what I’ve tried but it fails, all I see are the three lines, not just one of 
   them. What I’d like to achive is a line of text on my webpage that says something
   like
 * ‘My name is Micky Mouse, my email address is [someone@my.email.com](https://wordpress.org/support/topic/accessing-variable-how/someone@my.email.com?output_format=md)
   or you can phone me on 01234 567890.’
 * Can I do what I’m trying to achieve in Snippets or do I need to make three separate
   snippets, one line and one variable? Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Faccessing-variable-how%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Support [Mirza Hamza](https://wordpress.org/support/users/hamza1010/)
 * (@hamza1010)
 * [2 years, 10 months ago](https://wordpress.org/support/topic/accessing-variable-how/#post-16902801)
 * Hi [@oskar866](https://wordpress.org/support/users/oskar866/),
 * Thanks for your email,
 * I hope you are doing well, We have attached the snippet for your help and you
   can use it to get your desired output on the screen.
 * Please have a look at the screencast video: [link](https://www.awesomescreenshot.com/video/19211908?key=ff1be3733c4f19a677124d5eded8ad28)
 * **snippets -1 :**
 *     ```wp-block-code
       <h1>User Details</h1>
       	My name is {name}, my email address is {email} or you can phone me on {phone}.
       ```
   
 * **See the screenshot**: [https://ibb.co/RTZLVNZ](https://ibb.co/RTZLVNZ)
 * Thanks & Regards
 * WP Experts Support Team
    -  This reply was modified 2 years, 10 months ago by [Mirza Hamza](https://wordpress.org/support/users/hamza1010/).

Viewing 1 replies (of 1 total)

The topic ‘Accessing variable, how?’ is closed to new replies.

 * ![](https://ps.w.org/post-snippets/assets/icon-128x128.gif?rev=2545587)
 * [Post Snippets - Custom WordPress Code Snippets Customizer](https://wordpress.org/plugins/post-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/post-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-snippets/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Mirza Hamza](https://wordpress.org/support/users/hamza1010/)
 * Last activity: [2 years, 10 months ago](https://wordpress.org/support/topic/accessing-variable-how/#post-16902801)
 * Status: resolved