Jump to content
TNG Community
KevyNC

Help with TNG & Wordpress - Menu & Header

Recommended Posts

KevyNC

Hello,

I am not sure what I am doing wrong -- the TNG Pages loads BUT without any WP headers/menus

[EDIT] I am attemping to use the Kloosterman method  --however I did have the TNG Plugin previously active (it is currently NOT active)

Using registered Avada/Fusion Theme.  I have WordPress in Root and TNG in subfolder (/tng1203)

  • I have three files in /tng1203

image.png

  • WP-TNG-topmenu.php

<?php
require ("../wp-blog-header.php");
get_header ();
?>

  • WP-TNG-footer.php

<?php
get_footer ();
?>

  • WP-TNG-meta.php

<?php
global $cms;
?>
<link href="<?php echo $cms['tngpath']; ?>

  •  wp-blog-header.php (root)

<?php
/**
 * Loads the WordPress environment and template.
 *
 * @package WordPress
 */

if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

    // Load the WordPress library.
    require_once( dirname(__FILE__) . '/wp-load.php' );

    // Set up the WordPress query.
    wp();

    // Load the theme template.
    require_once( ABSPATH . WPINC . '/template-loader.php' );

}

  •   .htaccess (root)

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress

TNG setup

image.png

image.png

 

When I navigate to  Surnames --- the page loads BUT WITHOUT WP headers or menu

image.png

 

Here is the result

image.png

imageproxy.php?img=&key=f616731acf049aaf

Using  Permalinks

image.png

Website below -- let me know what other info you might need

https://alveslaborefamily.net/

 

Share this post


Link to post
Share on other sites
theKiwi

Change the Genealogy URL in your settings to

https://alveslaborefamily.net/Genealogy/

if Genealogy is the name of the page you want TNG to appear on.

Does that make a difference?

Note, I really know nothing about using the Kloosterman method which is what you seem to be using - can you confirm that - and edit your first post to indicate if this is the case?

Roger

Share this post


Link to post
Share on other sites
KevyNC

Hi Roger,

yes I was attempting to use the Kloosterman method.

So you are saying I might need to change this URL to "Genealogy" instead of "tng1203`?   so it the PAGE not the folder/subfolder?   that migth explain it (or at least part of it)  -- so that part of the permalinks?

image.png

 

Share this post


Link to post
Share on other sites
cfj
1 hour ago, KevyNC said:
  • WP-TNG-topmenu.php

<?php
require ("../wp-blog-header.php");
get_header ();
?> 

Since I have WordPress and TNG in subfolders I use this code:

<?php
include ('/mypath/wordpress/wp-load.php'); 
get_header();
?>

When you use Kloosterman's system, you can set the TNG url to what you prefer, such as index.php, surnames.php, places.php etc.

Share this post


Link to post
Share on other sites
klooster

 

There is nothing wrong with your:

  • WP-TNG-topmenu.php
  • WP-TNG-footer.php
  • WP-TNG-meta.php

I see you are using the AVADA template!
Your problem is the way AVADA is using the headers.
If you are using a AVADA theme template, you have to put the header inside one of the AVADA headers you choose.
Activate the child theme of AVADA. Place the AVADA template you are using in : /wp-content/themes/Avada-Child-Theme/templates.
In my case, I am using the AVADA 5 template (see printscreen).

Place your header as follows in the template (5 I am using) in the child theme
Between:
 <?php avada_logo(); ?>
and
 <?php if ( 'flyout' === Avada()->settings->get( 'mobile_menu_design' ) ) : ?>
 
As below:
<?php
/**
 * Header-v5 template.
 *
 * @author     ThemeFusion
 * @copyright  (c) Copyright by ThemeFusion
 * @link       http://theme-fusion.com
 * @package    Avada
 * @subpackage Core
 */
// Do not allow directly accessing this file.
if ( ! defined( 'ABSPATH' ) ) {
    exit( 'Direct script access denied.' );
}
?>
<div class="fusion-header-sticky-height"></div>
<div class="fusion-sticky-header-wrapper"> <!-- start fusion sticky header wrapper -->
    <div class="fusion-header">
        <div class="fusion-row">
            <?php if ( 'flyout' === Avada()->settings->get( 'mobile_menu_design' ) ) : ?>
                <div class="fusion-header-has-flyout-menu-content">
            <?php endif; ?>
            <?php avada_logo(); ?>
            
                <img   https://www.kloosterman.be/wp-content/uploads/AVADA_HEADER-1350x495.jpg"  />          

<?php if ( 'flyout' === Avada()->settings->get( 'mobile_menu_design' ) ) : ?>
                <?php get_template_part( 'templates/menu-mobile-flyout' ); ?>
            <?php else : ?>
                <?php get_template_part( 'templates/menu-mobile-modern' ); ?>
            <?php endif; ?>
            <?php if ( 'flyout' === Avada()->settings->get( 'mobile_menu_design' ) ) : ?>
                </div>
            <?php endif; ?>
        </div>
    </div>

 

PS: I placed this answer also in the Forum " Templates and design questions . PLEASE answer in the right forum :CMS Integrations,


 

Schermafbeelding 2019-02-12 om 21.46.47.png

Share this post


Link to post
Share on other sites
KevyNC

The  YouTube below shows about ChildThemes -- I am going to try modifying  now and let you know if I run into any issues

 

 

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

×