• Kelso

    (@kelso)


    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)
Viewing 2 replies - 1 through 2 (of 2 total)

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