0

I want to link a static PHP site from a folder in my root directory in the WordPress template file.

I tried using:

<?php require_once (get_bloginfo('url') . '/programm/loginform.php'); ?>

but it does not work.

I am trying to connect a:

<?php bloginfo('template_url'); ?> /programm/loginform.php" ?>

and a:

<?php require 'loginform.php'?>
Kirk Beard
  • 9,569
  • 12
  • 43
  • 47
elaxo
  • 1
  • It won't work because it doesn't know about WordPress unless you include the libraries. https://stackoverflow.com/questions/15304926/how-to-include-wordpress-functions-in-custom-php-file – Andrew Schultz Mar 18 '18 at 17:18
  • Possible duplicate of [How to include Wordpress functions in custom .php file?](https://stackoverflow.com/questions/15304926/how-to-include-wordpress-functions-in-custom-php-file) – Andrew Schultz Mar 18 '18 at 17:19
  • I have tried it and unfortunately it did not work loginform.php is a static php file which i want to include into the index page of the cms i got these error messages (next comment – elaxo Mar 18 '18 at 22:17
  • Warning: require_once(../../../../loginform.php): failed to open stream: No such file or directory in C:\xampp0\htdocs\wordpress\wp-content\themes\wpsteli1\header.php on line 60 – elaxo Mar 18 '18 at 22:21
  • Fatal error: require_once(): Failed opening required '../../../../loginform.php' (include_path='.;c:\php\includes') in C:\xampp0\htdocs\wordpress\wp-content\themes\wpsteli1\header.php on line 60 – elaxo Mar 18 '18 at 22:21

0 Answers0