plugins – How to access the PHP file inside the root folder in the WordPress theme?

Question

I have a folder structure like below

Project-1
 .header.php
 .footer.php
Project-2
Project-3
wp-admin
wp-content
wp-includes
.
.
.
all WordPress files

Now, I have header.php and footer.php files in my Project-1 folder. I am able to access both files in Project-2 and Project-3 using include(”).

My issue is, I have to use the header.php and footer.php files in the WordPress root folder.
I added below code /wp-content/theme/themename/header.php

<?php include('https://test.com/Project-1/header.php');?>
<?php include('https://test.com/Project-1/footer.php');?>

But it’s not working. Would you help me with this?

0
user9437856 2 weeks 2021-10-09T05:09:32-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse