Jump to content
TNG Community
cwbarner

Kloosterman Method - WP and TNG folders

Recommended Posts

cwbarner

I am a relative newby and have tried the WP[TNG integration using the plugin.  I am not having much success and would like to give the Kloosterman Method a shot.  My question is, now that I have both WP and TNG in sub-folders under the root (public_html), is it possible to try Cees's method without having to blow up the file structure?  Can the Kloosterman Method be accomplished with WP and TNG in separate sub-folders?  While I am somewhat familiar with WP (have used it in the past with a blog) as well as with TNG (using it as stand-alone site), I just want to make sure I don't do more than is completely necessary or absolutely required.  ANy advice would be very much appreciated.

Charlie

Share this post


Link to post
Share on other sites
klooster

WP has to be in the root of your website an TNG in a subfolder of your root. Your file structure will not blow up and it wil be independent of TNG versions and/or WordPress updates

Example:

Wordpress

  • /your-root/YOUR WP FILES
  • /your-root/wp-content/
  • /your-root/wp-includes/
  • /your-root/wp-admin/

and TNG

  • /your-root/TNG/YOUR TNG FILES 
  • /your-root/TNG/YOUR TNG SUBFOLDERS

 

Read my instructies here: How I made my Wp-TNG website

 

Share this post


Link to post
Share on other sites
cfj
5 hours ago, klooster said:

WP has to be in the root of your website

WP don't need to be in the root.

I have WordPress in a subfolder with its own directory   to the root and TNG in a subfolder.

On a test site I have WordPress in a subfolder and TNG in a subfolder.

TNG are integrated with WP without plugin. Just use the path to wp-load.php

require ('/home/path/public_html/wordpress/wp-load.php'); 

 

Share this post


Link to post
Share on other sites
klooster

That is correct CFJ, but then you must have the correct full path after the "include" statement.

I tried to make the WP-TNG integration instructions as easy as possible. For a lot of folks having Wordpress in the root makes the integration easier, because they may have problems finding the correct full path to include.

If you have Wordpress in the root as I suggested you do not need the full path but just "../".

That's why I wrote that Wordpress has to be (oké, preferably) in the root

 

PS:I do not use "include" but "require" because it is "required" to make a correct TNG integration

  • Use require() when the file is required by the application.
  • Use include() when the file is not required and application should continue when file is not found.

Share this post


Link to post
Share on other sites
cfj
55 minutes ago, klooster said:

That is correct CFJ, but then you must have the correct full path after the "include" statement. 

I tried to make the WP-TNG integration instructions as easy as possible. For a lot of folks having Wordpress in the root makes the integration easier, because they may have problems finding the correct full path to include.

Klooster:

In TNG  admin Setup >> Configuration >> General Settings >> Paths and Folders, you have the full path to TNG. (Just remove or change the last path to wp).

55 minutes ago, klooster said:

PS:I do not use "include" but "require" because it is "required" to make a correct TNG integration

  • Use require() when the file is required by the application.
  • Use include() when the file is not required and application should continue when file is not found.

Klooster: Thanks for pointing out my mistake. I have changed my previous comment.

Share this post


Link to post
Share on other sites
cwbarner

Thank you both for the feedback and guidance.  I know the cleanest way to use your method Cees is to have WP in the root and it makes sense.  Your instructions are very clear and concise. I was just curious if there was a way to do it without reinstalling/moving WP and TNG.  Again, I do appreciate the guidance.

Charlie

Share this post


Link to post
Share on other sites
mahesh
On 4/28/2019 at 7:20 AM, klooster said:

WP has to be in the root of your website an TNG in a subfolder of your root. Your file structure will not blow up and it wil be independent of TNG versions and/or WordPress updates

Example:

Wordpress

  • /your-root/YOUR WP FILES
  • /your-root/wp-content/
  • /your-root/wp-includes/
  • /your-root/wp-admin/

and TNG

  • /your-root/TNG/YOUR TNG FILES 
  • /your-root/TNG/YOUR TNG SUBFOLDERS

 

Read my instructies here: How I made my Wp-TNG website

 

I thought I would give heads-up to this method. I am using this method in my test site. For my own reasons, I have WP and TNG in their own folders and I have separate databases for Wordpress and TNG.

Instructions were precise and easy to use. Thank you.

Share this post


Link to post
Share on other sites
fluffy82

WP stores its pages in the database tables. My dream is that one day, it will be possible to upload TNG pages into the database, so they will actually be treated as real WP pages in stead of just an aesthetic resemblance between both.

Share this post


Link to post
Share on other sites
cwbarner

Cees (and all),

I've had some really good success with this method now.  Currently, I've not completed your method on my live internet site but have played with it in my WAMP test environment until I learned more about what I was doing with themes, etc.  The only problem I seem to be having involved the footer.  I created the WPTNG-footer.php as instructed but I continue to get errors in the footer area.  he headers works fine...it's just the footer.  I just need a little guidance and instruction on interpreting the errors.  Seems to have something to do with the genlib.php  on line 243 but I'm not sure what exactly I need to do.

Any help would be very much appreciated.

image.png

Share this post


Link to post
Share on other sites
cwbarner

Follow-up.  Here is the contents of the genlib.php file at the suspect area.

image.png

Share this post


Link to post
Share on other sites
fluffy82

Did you set the custom footer within the TNG settings? You have to specify the custom file in the site definition part.

Share this post


Link to post
Share on other sites
cwbarner

Fluffy,  I did set it in TNG.  Header works fine...it's just the footer where I get the error.  I created the WPTNG-footer.php file several times on the off chance that I just didn't create it properly.

Share this post


Link to post
Share on other sites
klooster

Show me the contents of your WPTNG-footer.php

Share this post


Link to post
Share on other sites
cwbarner

Cees, it's simply a copy/paste of what you had in your instructions.  I didn't modify it at all.  I don't have access to the file at the moment but will post the contents as soon as I can.  It will likely be late night your time by the time I get a chance.  No worries...I have no doubt it's something very simple that I'm just not seeing.

Just FYI...I created each of the three .php files using Notepad++.

Share this post


Link to post
Share on other sites
cwbarner

Cees,  I apologize.  I have it working now.  I can't explain it other than maybe a leading space at the beginning of the code?  As soon as I got home, I created it one more time, paying particular attention to what I was copying.  It works now. I see the WP footer on the TNG pages.  I worried more about the integration than I should have.  All is well.  Thank you so much for your guidance and assistance.  I'm just about ready to replicate this setup on my live website. 

Share this post


Link to post
Share on other sites
klooster

Yes that can be the problem, that’s why I asked to see the WPTNG-footer.php. It’s wel known in PhP how one little character can create havoc in a program, without even being reported to the PHP error logs! 

Share this post


Link to post
Share on other sites
MatthewHoutReilly

I was  not going to do the Kloosterman method on my website, but figured I'd give it a shot.   I believe I was successful in setting it up..

achillconnection.com

Share this post


Link to post
Share on other sites
mahesh
1 hour ago, MatthewHoutReilly said:

I was  not going to do the Kloosterman method on my website, but figured I'd give it a shot.   I believe I was successful in setting it up..

achillconnection.com

Looks pretty cool, Matthew.

AS you are using Kloosternan Method, I am sure would be deactivating tng-wordpress-integration Plugin.

 

Share this post


Link to post
Share on other sites
MatthewHoutReilly

Mahesh, 

I am posting two screen shots of what the page header looks like with tng-wordpress-intergration active and a screen shot when its deactivated, when its active it says "Genealogy" when it's deactivated it says "Error 404 Page", any idea how to fix?

With tng-wordpress-integreation.JPG

Without tng-wordpress-integreation.JPG

Share this post


Link to post
Share on other sites
theKiwi

If you have properly implemented the Kloosterman Method, then you should disable the TNG-WordPress-Plugin.

If after that you have display problems, then there is presumably something wrong with your Kloosterman Method implementation.

Roger

Share this post


Link to post
Share on other sites
klooster

Solution to your "404 error" problem on the TNG/AVADA pages 

Use the Child theme of AVADA, make directory "includes". Place a copy of AVADA custom_functions.php in that directory.

Find rule 195

$title = esc_html__( 'Error 404 Page', 'Avada' );

and change Error 404 Page into whatever you want (I changed it into Genealogy pages)

$title = esc_html__( 'Genealogy pages', 'Avada' );

On every TNG/AVADA page the title bar wil now show your text.

End last: disable as default the breadcrumbs in the AVADA Theme options

PS:

  • You can still use the breadcrumbs on the WP pages, but you have to turn them on in every WP page separately in the Page title bar Fusion page options.
  • If you use the custom css ( .fusion-page-title-bar { display:none!important;} as suggested by CFJ it will remove the page title bar in AVADA and the "404 error" message on the TNG pages. The downside of this method is that you cannot use the page title bar in the the normal WP pages

Schermafbeelding 2019-02-18 om 09.19.12.png

Schermafbeelding 2019-02-18 om 09.13.26.png

Share this post


Link to post
Share on other sites
mahesh
On 9/17/2019 at 2:31 PM, MatthewHoutReilly said:

Mahesh, 

I am posting two screen shots of what the page header looks like with tng-wordpress-intergration active and a screen shot when its deactivated, when its active it says "Genealogy" when it's deactivated it says "Error 404 Page", any idea how to fix?

With tng-wordpress-integreation.JPG

Without tng-wordpress-integreation.JPG

Hi Matthew,

Sorry for delay in responding.

I see you have some great advice from our top experts.

 look forward to a success post from you.

 

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

×