Title: PHP &#8216;Includes&#8217; generated by &#8220;THE_TITLE&#8221;
Last modified: August 18, 2016

---

# PHP ‘Includes’ generated by “THE_TITLE”

 *  [Kelso](https://wordpress.org/support/users/kelso/)
 * (@kelso)
 * [22 years ago](https://wordpress.org/support/topic/php-includes-generated-by-the_title/)
 * Hi guys,
    I’m having trouble here… What I’m trying to do is have a “PHP include”
   in which the name of the file it fetches is the title of the post. I don’t need
   anything to generate the file, that will be done by hand, but what I’d like is
   this: Say the name of the post is: “Lalalala” I need my INCLUDE to say: `<?php
   include('Lalalala.php'); ?>` But, what I need is the “Lalalala” in that code 
   to be generated by the “the_title” tag or something. All I need is something 
   that can make that code work, or something maybe even better than that if exists.
   The best I could think of was: `<?php include('<?php the_title(); ?>.php'); ?
   >` but as you guys know, that obviously doesn’t work.

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

 *  [Beel](https://wordpress.org/support/users/beel/)
 * (@beel)
 * [22 years ago](https://wordpress.org/support/topic/php-includes-generated-by-the_title/#post-58826)
 * <?php include(get_the_title(). ‘.php’); ?>
 *  Thread Starter [Kelso](https://wordpress.org/support/users/kelso/)
 * (@kelso)
 * [22 years ago](https://wordpress.org/support/topic/php-includes-generated-by-the_title/#post-58827)
 * Sweet! Thanks!! 🙂

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

The topic ‘PHP ‘Includes’ generated by “THE_TITLE”’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [Kelso](https://wordpress.org/support/users/kelso/)
 * Last activity: [22 years ago](https://wordpress.org/support/topic/php-includes-generated-by-the_title/#post-58827)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
