I created a bookshop website and got header function, footer function and login menu on my front page.
All functions are declared in functions.php
and connected to hooks.
My front page runs correctly.
But I try to call registration menu file from one of my options of login menu (file page-non-member.php
) and to use use header from front page as a header on this page.
I try to use this:
require( dirname( __FILE__ ) . '../wp-load.php' );
if ( function_exists( 'get_template_part' ) ) {
echo "get_template_part found";
}
get_template_part( 'mybookshop', 'header' );
or that:
do_action( 'create_header_html', 'Make registration' );
But in both cases, I got the next message
Warning: require(W:\domains\wpfolder\wp-content\themes\mybookshop../wp- load.php): failed to open stream: No such file or directory in W:\domains\wpfolder\wp-content\themes\mybookshop\page-not-member.php on line 4
Fatal error: require(): Failed opening required 'W:\domains\wpfolder\wp- content\themes\mybookshop../wp-load.php' (include_path='.;w:/modules/php/PHP-5.6;w:/modules/php/PHP-5.6/PEAR/pear') in W:\domains\wpfolder\wp-content\themes\mybookshop\page-not-member.php on line 4".
Structure of my folders:
-- WordPress root directory
|-- file wp-load.php
|
....
|
-- my site(bookshop) root directory
|-- header.php,header.php, page-home-page.php, page-not-member.php, etc
|
....
I use a local server(OpenServer). What is the problem and how can I resolve it?