Calling WordPress functions from a file.php inside the theme
-
Hello, I created a file.php inside my theme folder that is called when a user clicks on a link on a page that has applied a page-template. Inside that file.php I clear some $_SESSION variables and the need to redirect to homepage. The problem is that this file doesn’t recognize any of wordpress constants or functions:
1- Notice: Use of undefined constant ABSPATH – assumed ‘ABSPATH’
2- Fatal error: Call to undefined function wp_redirect()
What could be the problem?
I’m using Twenty_Fourteen theme modified.
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
The topic ‘Calling WordPress functions from a file.php inside the theme’ is closed to new replies.