wordpress Header

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
jaddison
Veteran Member
Posts: 38
Joined: 2020-06-12 12:44

wordpress Header

Post by jaddison » 2024-11-26 02:41

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

jaddison
Veteran Member
Posts: 38
Joined: 2020-06-12 12:44

Re: wordpress Header

Post by jaddison » 2024-11-26 03:17

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1667
Joined: 2018-04-01 10:12

Re: wordpress Header

Post by pbottcher » 2024-11-29 18:46

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();
				...
				
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

jaddison
Veteran Member
Posts: 38
Joined: 2020-06-12 12:44

Re: wordpress Header

Post by jaddison » 2024-11-30 21:13

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

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1667
Joined: 2018-04-01 10:12

Re: wordpress Header

Post by pbottcher » 2024-12-01 18:01

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?
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

jaddison
Veteran Member
Posts: 38
Joined: 2020-06-12 12:44

Re: wordpress Header

Post by jaddison » 2024-12-03 01:33

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

Post Reply