Title: WordPress page name as variable in php code
Last modified: September 1, 2016

---

# WordPress page name as variable in php code

 *  [shermano](https://wordpress.org/support/users/shermano/)
 * (@shermano)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/wordpress-page-name-as-variable-in-php-code/)
 * Hi all,
 * is it possible to catch the name of the page where I placed my php snippet? I
   developed some php code and inside I have one variable which could be filled 
   by the page name. This would help to reduce number of snippets in my personal
   situation.
 * KR
    Stephan
 * [https://wordpress.org/plugins/php-code-for-posts/](https://wordpress.org/plugins/php-code-for-posts/)

The topic ‘WordPress page name as variable in php code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/php-code-for-posts_0d1022.svg)
 * [PHP Code for posts](https://wordpress.org/plugins/php-code-for-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/php-code-for-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/php-code-for-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/php-code-for-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/php-code-for-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/php-code-for-posts/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [shermano](https://wordpress.org/support/users/shermano/)
 * Last activity: [9 years, 9 months ago](https://wordpress.org/support/topic/wordpress-page-name-as-variable-in-php-code/)
 * Status: not resolved