Jump to content
TNG Community

Kloosterman Method


RobynL13

Recommended Posts

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?

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...

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

Link to comment
Share on other sites

  • 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

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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 “”)
Link to comment
Share on other sites

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/

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 years later...

The TNG Plugin has stopped working on my site since the latest WP and DIVI updates.

So, I am trying to get the Kloosterman Method to work again, but I have the same issues as before. The TNG interface does display at https://birkey.org/tng, but my DIVI header and footer do not display above and below the TNG content. I would like the TNG interface to display below the title "Family Tree", on this page - https://birkey.org/family-tree/ - but I have not been successful so far.

  • The TNG Plugin is disabled
  • I've created and added the three files in the TNG folder
  • I've edited the index.php file
  • I've set the TNG templates to "No"

Attached is a screen mockup of what I am hoping to achieve... combining the two URL's above

Any suggestions?

goal.jpg

Link to comment
Share on other sites

You can revert your WordPress site back to 6.2.2 to keep the TNG-WordPress-plugin working while I try to find time to sort out and correct the failure it is experiencing under WordPress 6.3...

WP Downgrade | Specific Core Version plugin

https://wordpress.org/plugins/wp-downgrade/

will let you go back to WordPress 6.2.2 and stay there awaiting a resolution.

Roger

Link to comment
Share on other sites

Roger,

Thanks for the offer and suggestion. I am not opposed to doing it, however, you should know that even with earlier versions my DIVI site integration with TNG had issues. The Family Tree page would sometimes display as in my previous post, using TNG styles, and at other times it would display using DIVI styles. I could never figure out why. For the sake of keeping it simple, I would prefer to use the TNG styles since everything looks better with those, and I wouldn't have to create a lot of new CSS.

 

WP has been rolled back and TNG plugin reinstated.

Let me know...

chrome-divi-styles.jpg

chrome-black-style.jpg

chrome-tng-style.jpg

Link to comment
Share on other sites

My site is using only TNG styles (from the TNG style sheets and from mytngstyle.css where I've mainly changed the colours of everything, and added a few tweaks to make things look the same across the site. When I've seen oddities like the drop down menus not appearing correctly, and forced reload usually sorts that out. I've not done any styling in WordPress, only in the options for the theme I'm using - Suffusion - to set colours and other styles.

Roger

Link to comment
Share on other sites

Roger,

Where and how do I tell TNG what CSS styles to use for the Family Tree page?

Inspecting the Family Tree page I see a bunch of TNG-related CSS stylesheets referenced, not my DIVI stylesheets, yet the display looks like my DIVI styles (green links, etc.), and not the TNG styles (blue scheme).

Randy

inspector.jpg

Link to comment
Share on other sites

The green colour is coming from line 1452 of family-tree according to "Inspect Element"...

image.png

So something to do with the theme and any customisations you've made to it.

Roger

Link to comment
Share on other sites

Roger,

As far as I know, I haven't customized the DIVI theme in anything other than standard ways - selecting link colors, font colors, styles, etc. in a master settings area. There is no custom CSS code or hacks that have been done. It's all standard DIVI stuff.

Is there any update on a plugin fix for the latest WordPress versions?

Randy

Link to comment
Share on other sites

I will chime in on this..

There are a number of issues relating to CSS specificity with WordPress and TNG.. Some folks have very successfully taken all TNG CSS and added it into Wordpress.. It should work and in fact if done right should work REALLY well.. I haven't done so at this time..

I Like Roger do ALL my TNG styling using mytngstyle.css. I have though changed where TNG loads the css file to make it load at an appropriate point for my Theme Astra / Elementor..

Even still Specificity can be quite a pain.. So this could be part of your issues..

Using the 'Kloosterman' Wraparound method is not as straight forward as one may think.. But I believe @klooster Cees uses Divi so maybe he can provide some better advise or point to where you might need to be.

There is also the issue of dbl <head></head> sections being created.. which may or may not have an impact on CSS Specificity..

Just looking at your page etc may not be enough to understand what is going on.. IF you use the TNG meta files what are the contents? Do you use custom headers and footers in Divi?? And a few other bits that I have found to be problematic.. Because I generally deal with this myself I just do it and have NEVER documented exactly what it is (I see lots of folks shuddering at that I know) so I can never quite remember exactly what I do until I have to do it..

I am happy to TRY and help, but would prob need some serious access to TNG FTP WordPress and maybe other too..

I love trying to sort CSS cos I do.. And have done pretty well sorting WordPress TNG wraparound for my site using 'Kloosterman' method.

 

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...