V
V
Vasily Petrov2017-12-02 21:19:53
Nginx
Vasily Petrov, 2017-12-02 21:19:53

How to make WP understand functions outside the template, for example on the my_site.ru/dir/page.php page (for connecting via SSI in NGINX)?

Set up caching, everything works fine, enabled ssi.
At the root, WP created an ssi folder, page.php in it.
I insert it into the template so that part of the content on the page is not cached.
This also works, tested

echotime();
.
I inserted a part of the code from the template that I don't want to cache, and it doesn't output anything, it gives an error:
"PHP message: PHP Fatal error: Uncaught Error: Call to undefined function is_user_logged_in()

What can be done? Maybe there are other ways to "highlight" dynamic objects on the page that should not be cached?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Boris Korobkov, 2017-12-03
@mbpig

PHP Fatal error: Uncaught Error: Call to undefined function is_user_logged_in()

Can you translate it yourself or can you do it yourself with the help of Google Translate?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question