Jump to content
TNG Community
RobynL13

Kloosterman Method

Recommended Posts

RobynL13

Hi everyone

I am new to TNG and the forum but not new to WordPress.

I have tried searching for an answer to my question but without luck...obviously using the wrong search words.

I have been using these instructions and added the three files (WPTNG-topmenu.php, WPTNG-footer.php, WPTNG-meta.php). However, after the three files, the instructions mention a workaround to display the index.php page within the WP theme. For the life of me, I can't locate a file that includes this code index.php change line 12:“$flags[‘noheader’] = true;

The site is using WordPress version 5.6 and I'm using one of the standard templates with Elementor.

Can someone point me in the right direction, please?

Share this post


Link to post
Share on other sites
klooster

The index.php file is found in your TNG folder, the $flags[‘noheader’] = true; is on line 12, see attached print screen.

 And you write "I am using one of the standard templates", I presume you mean one of the standard TNG templates?

 In my instructions, STEP 4: Set in TNG Admin Setup >> Configuration >> Template Settings: Enable Template Selection to NO and click SAVE.

 You cannot use one of the TNG templates, you have to use a WP theme

I used the WordPress template AVADA, but you do not need AVADA. Just about any WordPress Theme that is compliant with the official WordPress theming guidelines will work with this TNG integration method.

 PS: What is the URL of your website Robyn?

Schermafbeelding 2021-01-30 om 08.41.52.png

Share this post


Link to post
Share on other sites
RobynL13
17 hours ago, klooster said:

The index.php file is found in your TNG folder, the $flags[‘noheader’] = true; is on line 12, see attached print screen.

Ah, that makes sense. I was looking in Wordpress index.pho and WP template folders!

Thanks, Cees.

Share this post


Link to post
Share on other sites
rbirkey

Hello, I have a working WordPress site using the TNG Plugin at https://birkey.org. The TNG integration is found on the Family Tree page at https://birkey.org/family-tree/
We are using a popular WordPress theme called DIVI - https://www.elegantthemes.com/gallery/divi/
However, the TNG plugin is no longer being aggressively supported and is creating some performance errors that I would like to avoid.
So, this non-plugin solution was suggested as a possible option by Darrin.
I created the three PHP files and uploaded them to my "tng" folder which is where I put the TNG files.
I went to my TNG Admin and made the changes to the Site Design and Definition and Template settings as described.
I disabled the TNG Plugin.
Then I tested the page at https://birkey.org/family-tree/ -- and it was blank. No integration.
Attached are screenshots of my application.
I'm trying to understand what I did wrong or what needs to change in my case. Any help would be appreciated.

tng-folder-new-files.jpg

tng-footer-php.jpg

tng-meta-php.jpg

tng-not-integrated.jpg

tng-site-design.jpg

tng-topmenu-php.jpg

Share this post


Link to post
Share on other sites
klooster
  • Your site looks oké from here, see attached printscreen.
  • Your TNG page is loading Wordpress, see attached printscreen of the sourcecode
  • So, in my opinion there is nothing wrong with the WP_TNG integration.

The only thing is that the header slider is not loading in the TNG pages.I  see that your are using the DIVI theme, I have no experience with the DIVI theme, so you have to figure out how to load it in the TNG pages, if that is what you want.

And you have to make the TNG menu links in the WP menu, as you can read in my instructions (step 5):

Step 5.) The default TNG index.php page will not be displayed within the WP theme. The WordPress Appearance Menus Screen enables a user to create custom navigation menu in place of a theme’s default menu. Use this to make links to the TNG pages you would like to have.

  • PS: There is a workaround to display the index.php page within the WP theme:
  1. In index.php change line 12:“$flags[‘noheader’] = true; ” —>into –> “$flags[‘noheader’] = false; ” ( without the “”)
  2. f you also want the icons to be displayed: change line 11: “$flags[‘noicons’] = true; ” —>into –> “$flags[‘noicons’] = false; ” ( without the “”)

Schermafbeelding 2021-02-18 om 22.39.46.png

Schermafbeelding 2021-02-18 om 22.42.34.png

Share this post


Link to post
Share on other sites
rbirkey

I've gone over all the steps again, and see the same results. You can take a look at it and see the blank page.

FYI - there is no header slider on the Family Tree page - https://birkey.org/family-tree/

Here are the reasons I do not want to use the plugin. In the Site Health screen I see this when the plugin is enabled:

A PHP session was created by a session_start() function call. This interferes with REST API and loopback requests. The session should be closed by session_write_close() before making any HTTP requests.

The REST API is one way WordPress, and other applications, communicate with the server. One example is the block editor screen, which relies on this to display, and save, your posts and pages.

The REST API request failed due to an error.
Error: cURL error 28: Operation timed out after 10001 milliseconds with 0 bytes received (http_request_failed)

Share this post


Link to post
Share on other sites
rbirkey

Shouldn't there be some way to tell the "Family Tree" page to load the TNG code? Within the TNG Plugin there was a feature to tell the software what page to use to load the TNG code, and to enter the server path to that folder. In my case the path to the tng folder is: /home/137258.cloudwaysapps.com/bpaqjpzgwk/public_html/tng/ and I think that the TNG Plugin told WP to load that folders "index.php" on the Family Tree page.

Right now the Family Tree page is just a blank page with no content. Shouldn't there be some kind of shortcode inserted there?

family-tree-page-admin.jpg

Share this post


Link to post
Share on other sites
rbirkey

It seems to me that I need the code that is producing this section of the https://birkey.org/tng/index.php page, to display on the WP DIVI Family Tree page. How do I make that connection? There is a "Code" module within the DIVI Builder where executable code can be inserted within the DIVI page structure.

tng-index.jpg

divi-code-module.jpg

Share this post


Link to post
Share on other sites
klooster

You do not need the code, you can leave index.php in https://birkey.org/family-tree/

But did you change something after my last???  because then your site was working fine, see my last attached printscreen. Because now I also get a blank when I go to https://birkey.org/family-tree/surnames.php/

 

PS: 

tep 5.) The default TNG index.php page will not be displayed within the WP theme. The WordPress Appearance Menus Screen enables a user to create custom navigation menu in place of a theme’s default menu. Use this to make links to the TNG pages you would like to have.

  • PS: There is a workaround to display the index.php page within the WP theme:
  1. In index.php change line 12:“$flags[‘noheader’] = true; ” —>into –> “$flags[‘noheader’] = false; ” ( without the “”)
  2. f you also want the icons to be displayed: change line 11: “$flags[‘noicons’] = true; ” —>into –> “$flags[‘noicons’] = false; ” ( without the “”)

Share this post


Link to post
Share on other sites
theKiwi

The lines you indicated in Red as "Code?" is the contents of the index.php file in the TNG directory.

Roger

Share this post


Link to post
Share on other sites
klooster

This works oké, https://birkey.org/tng/surnames.php.

Like I said:

  • Your site looks oké from here, see attached printscreen.
  • Your TNG page is loading Wordpress, see attached printscreen of the sourcecode
  • So, in my opinion there is nothing wrong with the WP_TNG integration

So it’s not https://birkey.org/family-tree/ but https://birkey.org/tng/

Share this post


Link to post
Share on other sites
rbirkey

I must not be communicating clearly enough. I'll try again.

This morning when I posted about 5 hours ago, the site had the Kloosterman files and edits done as best I understood them, and the former TNG Plugin disabled. The Family Tree page did not display any TNG search interface as it did before using the TNG Plugin. The TNG search interface did appear on the TNG Index page located at https://birkey.org/tng/index.php, but that is not a page that I use in my WordPress site because it does not use my WordPress theme. So it is missing the header and footer of our website.

I had hoped that this solution would deliver the same results as the TNG Plugin, but without the plugin. The plugin creates several performance errors that I would rather avoid if possible. I simply wanted to know how to get the TNG search interface to appear on my Family Tree page at https://birkey.org/family-tree/

Since I was not able to get that to work, I have gone back to the TNG Plugin.

Thanks.

 

 

Share this post


Link to post
Share on other sites
theKiwi
1 hour ago, klooster said:

This is the site in WordPress using the TNG-WordPress-plugin

1 hour ago, klooster said:

This is to the same TNG content directly, not invoking WordPress.

All seems to be working as near as I can tell with the plugin.

To edit that page that appears at either of the above links, edit the page index.php that is in the TNG folder.

Roger

Share this post


Link to post
Share on other sites
rbirkey

Attached are screens showing what I had hoped to accomplish and why. The TNG Plugin creates a couple of performance issues in the Site Health tool that I want to avoid. I had hoped to be able to display the TNG search interface as it displays when using the TNG Plugin, but when not using the plugin. It seems I misunderstood the purpose and use of this method, and it cannot replicate how the TNG Plugin looks and works.

tng-plugin-issues.jpg

tng-index.jpg

tng-plugin.jpg

Share this post


Link to post
Share on other sites
theKiwi

Can you quantify the performance issues?

I've been using the plugin for years and it just works - yes, pages take longer to load than if they are called directly from TNG, but at the end of the day does that really actually matter? It gives you what you're looking for in terms of display apparently.

Roger

Share this post


Link to post
Share on other sites
rbirkey

I will continue to use the TNG Plugin for now, but as Darrin has told me, 

"I do know that the TNG-WordPress plugin was written years ago by someone who thereafter lost interest in the project. I (along with a few others) have tried to keep it viable since then, but I've started to remove any mention of it from TNG marketing materials because it's becoming harder as the WordPress code continues to change."

So, I'm not confident of its future. I was hoping to be able to just ditch it now as it is not likely to get any better.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×