Support » Themes and Templates » undefined functions in new included theme file

  • doranpalmer

    (@doranpalmer)


    I’m unable to call the function comments_template() from a file. I can call it fine from single.php, but instead I need to include another php file where the comments go in single.php, and that included file needs to call comments_template().

    — single.php —
    include(‘file.php’);

    — file.php —
    comments_template();

    Problem is that I get an error for the undefined function. I’ve tried including various other files into file.php like wp-load.php and such to help get rid of this error, but nothing seems to work. searching the codex, google, php.net, and these forums have yielded no answers, and I’m lost from here.

    I even tried making file.php into file.txt but nothing has worked. PLEASE HELP!!!

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘undefined functions in new included theme file’ is closed to new replies.