Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
All my WordPress files are in:
/httpdocs/news/
and the classes I want to call are in:
/private/classes/
Would I use the include_once() function or is there a WordPress function? And how would I do it?
Cheers
Include this in your theme functions,
<?php $includes_path = 'the root folder you want to call'; require_once $includes_path . 'the_class_you_are_calling.php'; ?>
Also make sure you have the privileges access... I know it's dummy but I've been there done that...
Required, but never shown
By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.
Start asking to get answers
Find the answer to your question by asking.
Explore related questions
See similar questions with these tags.