• Hello

    I’ve been struggling with this question for a while. To easily explain my question this is what i want to do:

    <?php
    $file = file_get_contents (‘wp-content/themes/mytheme/custom.php’);
    Echo $file;
    ?>

    I want to add this line into “some place” for example into page.php file. This works fine for just text, but if i want to make php work wordpress inside that file i need to add something… But add what? I understand that example for page.php its…

    <?php
    /*
    Template Name: Something
    */
    get_header(); ?>

    …which binds the php with wordpress. But if i want just a random file? Is it even possible?

    Regards,
    Karl

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Running custom files in wordpress enviorment’ is closed to new replies.