Jump to content
TNG Community

Kloosterman Method


rbirkey

Recommended Posts

1 hour ago, RickM said:

Eric,

Are you using the same database and or tables?? IF so perhaps copy the config.php file or at least the Database info to the new config.php..

If you have created a new database then make sure the database name is correct in the config.php. Have you checked the new database to see if the tables are there..

I don't have much more to offer I'm sorry.. As already said I'm not great with database stuff..

 

For some odd reason, today, it worked flawlessly. As you see, it is connected to the database. This was what it did last night without issues. The issue was creating the tables. TNG couldn't communicate with the database. She worked just now.

Last night, when I glanced at the config file, it was like it wasn't being written as you completed the tasks.

It's super weird, but now this is documented for others. The only thing I can say is just come back a few hours later in case your hosting provider was doing maintenance(even though my other websites were accessible).

tng-wordpress.png

Link to comment
Share on other sites

  • Replies 69
  • Created
  • Last Reply

Top Posters In This Topic

  • klooster

    27

  • rbirkey

    16

  • stackos

    16

  • RickM

    6

Top Posters In This Topic

Posted Images

6 hours ago, RickM said:

Eric,

Are you using the same database and or tables?? IF so perhaps copy the config.php file or at least the Database info to the new config.php..

If you have created a new database then make sure the database name is correct in the config.php. Have you checked the new database to see if the tables are there..

I don't have much more to offer I'm sorry.. As already said I'm not great with database stuff..

 

I managed to recreate the error.

tng-wordpress-fail.png

Link to comment
Share on other sites

I think this may be a hosting issue..
Perhaps, first, manually make sure the database info is in the TNG config.php file.. IE: Edit the file to make sure the right info is in the file.

Otherwise speak with your hosting provider.. See if they can provide a solution or some clue!!

 

 

 

Link to comment
Share on other sites

On 2/27/2025 at 10:18 PM, RickM said:

I think this may be a hosting issue..
Perhaps, first, manually make sure the database info is in the TNG config.php file.. IE: Edit the file to make sure the right info is in the file.

Otherwise speak with your hosting provider.. See if they can provide a solution or some clue!!

 

 

 

Yeah. I'm leaning towards them as well. I'm just glad I was able to replicate it. I may rent another server for testing, etc. However, I'm just ready to get back to working on building sites on this one. I don't want to accidentally break something and have all sites affected. TNG acted weird on my other site(on this server), so I decided to pause testing on my other TNG license. It could have been a fluke, etc. I have a decade on that tree, so I'm not willing to risk it, especially since my original server service expires in June, where my online backup is. It was a rough work week, so I just want to relax and research now. lol

Edit - I got bored and decided to replicate and try to solve it. For some odd reason, it showed that the credentials were correct and connected to the database. The config.php was NOT being updated as you mentioned. I just manually entered it. Click Save Changes and return to the TNG install installation part (WITHOUT refreshing). I was able to complete the rest of the install. I noticed that it was not "writing" it when I replicated it last time but I didn't bother to solve it as I was heading to bed.

Edited by Eric Stack
Found solution to the problem.
Link to comment
Share on other sites

  • 6 months later...

Turning a family genealogy site into a WP-TNG site.

Not doing anything different, but WP and TNG have both been updated since I did this successfully last year. As soon as I view the PHP code in the new header, I get a blank page, indicating a PHP conflict I'm guessing. I was hoping to get it going, but if I can't, I won't lose any more time on this and will keep it straight TNG. I purposely left everything but the <?php so you can see that it is there, but the second I enter those characters, it is a white page. Code is pulled directly from Klooster's website.

wptng error(2).png

wptng error.png

Link to comment
Share on other sites

Looks like you have something not quite right in your Custom Header php file or Custom Meta php file.

The code directly from Kloostermans site May or May NOT work without change. In my past experience with WP /TNG 'Wrap Around' WP Theme and Page Builder does make a difference, even paid and unpaid version of.

Been some time since I played on this field, I would be happy to try and help though.. There are numerous others who have done so much better than I who could prob solve this in a jiffy!

Link to comment
Share on other sites

5 hours ago, RickM said:

Looks like you have something not quite right in your Custom Header php file or Custom Meta php file.

The code directly from Kloostermans site May or May NOT work without change. In my past experience with WP /TNG 'Wrap Around' WP Theme and Page Builder does make a difference, even paid and unpaid version of.

Been some time since I played on this field, I would be happy to try and help though.. There are numerous others who have done so much better than I who could prob solve this in a jiffy!


Avada theme. I have omitted the global $cms; code from meta.php. During my trouble shooting. The site is not a blank page with meta.php code from his site. It only goes blank with either topmenu, footer, or both.

even rolled back to WP 6.7 version with 14.0.6 TNG. Same thing.

Link to comment
Share on other sites

@Eric Stack,

I am most def not an expert (drip under pressure) but have spent some time in the past playing with this, as have a few others here.

If you would like to share your header, footer, and meta files with me I can have a look at them and see what I might.. I think you can do that via private mail here.. Better that way than have EVERYONE know paths etc..

There are a few here that I have helped in the past who can vouch for my integrity (or not as some might want to <smile>).. 

Worth a crack huh!

 

Link to comment
Share on other sites

On 9/25/2025 at 12:52 AM, RickM said:

@Eric Stack,

I am most def not an expert (drip under pressure) but have spent some time in the past playing with this, as have a few others here.

If you would like to share your header, footer, and meta files with me I can have a look at them and see what I might.. I think you can do that via private mail here.. Better that way than have EVERYONE know paths etc..

There are a few here that I have helped in the past who can vouch for my integrity (or not as some might want to <smile>).. 

Worth a crack huh!

 

My main files or the WPTNG- files that you create? WPTNG were as on the website. Original ones follow:

topmenu.php
 

<body>

meta.php

<?php
	global $cms;
?>

footer.php

<?php global $text, $tng_version, $flags; ?>
<hr size="1" />
<?php
	$flags['basicfooter'] = true;
	tng_footer($flags);
?>
<br/>

website is https://XYZ.com/project_timelinejourneys

Currently rocking Template 20 on it. If you need more specific code rather than what everyone gets on the TNG install, let me know, and I'll send it by PM. I currently have the developer keys disabled on the website to prevent small, sneaky copy-and-paste websites (I write pages for local cemeteries, etc.).

Link to comment
Share on other sites

@Eric Stack

<?php
require ("../wp-load.php");

get_header ('tng');

 $pageTNG = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME); // output : index ? 

echo "<!-- Start TNG page build Div container. ID is phpfilename --><div id=\"<pg_" . $pageTNG . "\" class=\"tng-container\">";

?>

At the time I was using Elementor Page Builder with Astra Theme, both Pro versions

 

This was my topmenu.php content..

See what you can do with that..

Yours seems to be missing quite a lot really..

Edited by RickM
Additional info supplied
Link to comment
Share on other sites

On 9/27/2025 at 2:49 AM, RickM said:

@Eric Stack

<?php
require ("../wp-load.php");

get_header ('tng');

 $pageTNG = pathinfo($_SERVER['PHP_SELF'], PATHINFO_FILENAME); // output : index ? 

echo "<!-- Start TNG page build Div container. ID is phpfilename --><div id=\"<pg_" . $pageTNG . "\" class=\"tng-container\">";

?>

At the time I was using Elementor Page Builder with Astra Theme, both Pro versions

 

This was my topmenu.php content..

See what you can do with that..

Yours seems to be missing quite a lot really..

The WPTNG-XYZ.php files code I am using can be found on Mr. Koosterman's website.

So far, with troubleshooting (just like the past 30 minutes). We're pulling a white screen when this code is in the WPTNG-meta.php file:

<link href=”<?php echo $cms[‘tngpath’]; ?>

When I removed that to leave this code: Edit: All of the code following <link should have been removed in my case, as it did not pertain to me in this WP-TNG install.

<?php
global $cms;
?>

I can have the file under General Settings in TNG point to WPTNG-meta.php, and it will no longer display a white screen.

As far as WPTNG-topmenu.php file. I used the one suggested on his website. Even though it initially gave me a white screen. I deleted the ../ and Save Changes. Then re-added the ../ and it is now working. Tomorrow, if I have time, I will be working on the WPTNG-footer.php file.

Slowly, but surely, we're getting there. I wish I didn't have to treat this as a hobby so that I could dedicate a little more time to it. However, being married with three kids, from Kindergarten to college, quickly eats away at your free time. lol

So far, fingers crossed, it looks like the culprit was the <link href= "..."> line of code.

Link to comment
Share on other sites

14 hours ago, Eric Stack said:
<link href=”<?php echo $cms[‘tngpath’]; ?>

 

This is incorrect:

It has a smart/curly quote, not a straight quote " that is required.

At least in what you posted there is no closing "

Roger

Link to comment
Share on other sites

2 hours ago, theKiwi said:

This is incorrect:

It has a smart/curly quote, not a straight quote " that is required.

At least in what you posted there is no closing "

Roger

Now looking at the code closer. I should've left it all off anyway, as it did not pertain to me. I focused more on the ?> rather than looking for the ending code for "<link"

 

<?php
global $cms;
?>
<link href=”<?php echo $cms[‘tngpath’]; ?>
css/YOUR-TNG-EXTRA.css” rel=”stylesheet” type=”text/css”/>

 

Link to comment
Share on other sites

16 hours ago, Eric Stack said:
<?php
global $cms;
?>
<link href=”<?php echo $cms[‘tngpath’]; ?>
css/YOUR-TNG-EXTRA.css” rel=”stylesheet” type=”text/css”/>

This STILL is showing curly quotes, which will break the PHP and cause a white page at best.

You MUST use straight quotes - both the single and double ones.

Roger

Link to comment
Share on other sites

13 minutes ago, theKiwi said:

This STILL is showing curly quotes, which will break the PHP and cause a white page at best.

You MUST use straight quotes - both the single and double ones.

Roger

That's the code straight from the website. I personally don't use it so it's all deleted.

I just run the <?php ?> And that's it. Didn't need the global line for Avada theme.

Link to comment
Share on other sites

11 hours ago, Eric Stack said:

That's the code straight from the website. I personally don't use it so it's all deleted.

I just run the <?php ?> And that's it. Didn't need the global line for Avada theme.

If you're just using 

<?php ?>

then you don't need to use anything at all.

But what I'm pointing out is wrong is this chunk

11 hours ago, theKiwi said:
<link href=”<?php echo $cms[‘tngpath’]; ?>
css/YOUR-TNG-EXTRA.css” rel=”stylesheet” type=”text/css”/>

The curly quotes - single and double here - should be straight single and double quotes.

Roger

Link to comment
Share on other sites

15 minutes ago, theKiwi said:

If you're just using 

<?php ?>

then you don't need to use anything at all.

But what I'm pointing out is wrong is this chunk

The curly quotes - single and double here - should be straight single and double quotes.

Roger

I wonder if he is still active in the community to make that change on his website.

Link to comment
Share on other sites

Let's go back to basics.

  • In my integration method,  I recommend installing WordPress in the root directory of your website and TNG in a subdirectory. This isn't explicitly necessary, but I recommend it because it keeps the two installation files neatly separate.
  • If you do this, and in my case, with the Avada theme, the WPTNG-topmenu.php works flawlessly, as I explain in my method.
  • The reason the "../ " code is placed before the wp-blogheader.php in WPTNG-topmenu.php is that this PHP code tells TNG to look for the wp-blog-header.php file one directory higher than where TNG itself is installed.
  • With the Avada theme (and in most WP themes) you don't need the "global $cms" in the WPTNG-meta.php file; you can simply omit it. The only thing you could add to WPTNG-meta.php is YOUR-TNG-extra.css if you want to keep track of your class and/or ID changes for TNG there.
  • But then I immediately wonder, "Why would you do that?" Because in WP --> Appearance --> Customize  --> Additional CSS you can define all your class and/or ID changes much more easier  and you see the results immediately on your screen.
  • WPTNG-footer.php works perfectly if you use the code as in my instructions.

PS: But I want to give a warning: a small PHP error is easily made, one space too many or too few, one wrong character, and the whole system breaks down.


 

Link to comment
Share on other sites

14 hours ago, klooster said:

Let's go back to basics.

  • In my integration method,  I recommend installing WordPress in the root directory of your website and TNG in a subdirectory. This isn't explicitly necessary, but I recommend it because it keeps the two installation files neatly separate.
  • If you do this, and in my case, with the Avada theme, the WPTNG-topmenu.php works flawlessly, as I explain in my method.
  • The reason the "../ " code is placed before the wp-blogheader.php in WPTNG-topmenu.php is that this PHP code tells TNG to look for the wp-blog-header.php file one directory higher than where TNG itself is installed.
  • With the Avada theme (and in most WP themes) you don't need the "global $cms" in the WPTNG-meta.php file; you can simply omit it. The only thing you could add to WPTNG-meta.php is YOUR-TNG-extra.css if you want to keep track of your class and/or ID changes for TNG there.
  • But then I immediately wonder, "Why would you do that?" Because in WP --> Appearance --> Customize  --> Additional CSS you can define all your class and/or ID changes much more easier  and you see the results immediately on your screen.
  • WPTNG-footer.php works perfectly if you use the code as in my instructions.

PS: But I want to give a warning: a small PHP error is easily made, one space too many or too few, one wrong character, and the whole system breaks down.


 

The method worked fine except I did not omit the entire <link....../> line. That was the issue with me.

Unsure about the straight and curly quotation marks. I think it's more likely that copying and pasting it into this forum changed it, as it appears straight on the website.

Out of the two methods. I enjoy yours the best, as it's simple to understand, provided you pay attention to omitting the entire line of code instead of just a section of it, like I initially did.

Link to comment
Share on other sites

20 hours ago, theKiwi said:

If you're just using 

<?php ?>

then you don't need to use anything at all.

But what I'm pointing out is wrong is this chunk

The curly quotes - single and double here - should be straight single and double quotes.

Roger

It's weird. I paste it directly into this box, and it's straight quotes. I click "Code" and paste it there; then they become curly. -shrug- I'll avoid using the Code feature in the reply boxes so the right quotes are used.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...