Page 1 of 1

wordpress Header

Posted: 2024-11-26 02:41
by jaddison
hi.
I am trying to insert my Wordpress header into my table view page. I have been successful with inserting it onto a normal php page located in my hooks folder using
<code><?php include($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');
get_header();
</code>
but for the life of me i can't get it to work on my table view page in Appgini.
From the host of files Mytable_view.php, Mytable.php, Mytable_dml.php, Header-extras.php.....which one do i pick?

thanks in advance

JohnA

Re: wordpress Header

Posted: 2024-11-26 03:17
by jaddison
Reposted with the code snippet in code brackets

hi.
I am trying to insert my Wordpress header into my table view page. I have been successful with inserting it onto a normal php page located in my hooks folder using

Code: Select all

<?php include($_SERVER['DOCUMENT_ROOT'].'/wp-load.php');
get_header();
but for the life of me i can't get it to work on my table view page in Appgini.
From the host of files Mytable_view.php, Mytable.php, Mytable_dml.php, Header-extras.php.....which one do i pick?

thanks in advance

JohnA

Re: wordpress Header

Posted: 2024-11-29 18:46
by pbottcher
Hi John,

not sure what you your get_header() function returns. But as a starting point you could try to add it to the hooks/Mytable.php -> Mytable_header

Code: Select all

switch($contentType) {
			case 'tableview':
				$header='<%%HEADER%%>'.get_header();
				...
				

Re: wordpress Header

Posted: 2024-11-30 21:13
by jaddison
pbottcher
Thanks for your reply. The page shows an error on the
<code> include($SERVER[‘DOCUMENT_ROOT’].’/wp-load.php’); </code>
This file needs to be accessed to enable get_header().
John

Re: wordpress Header

Posted: 2024-12-01 18:01
by pbottcher
Hi John,

you need to check where you have your wp-load.php. Additionally I cannot judge what that php script does, so it might conflict with AppGini, but this you need to figure out when loading the script.
What is the error that you are getting?

Re: wordpress Header

Posted: 2024-12-03 01:33
by jaddison
pbottcher
the error is very simple with no explanation "There has been a critical error on this website."
Including the wp-load.php file in a standalone .php file is fine. I feel that what I am asking Appgini to take on board is a conflict as you said.
I'll put it in the too hard basket and I will customize the Appgini header to get what i want.
Appgini is a great product and so customizable.
Thanks for your trying to sort the issue out for me.
regards
Joihn