It was brought up that the method in Part 1 was having 2 duplicated tags:
The tags are the title, head, body and html tags.
This is how I fixed that without too much disturbing WP or TNG code. I also wanted to keep the website running with very little disruptions.
(* Special Note: These changes would need to be made each time you change or update your WP theme. If you like changing your theme often and do not mind a possible seo hit with the search engines then suggestion not making these changes.)
First I copied the WP theme file called footer.php and named it footer-tng.php and removed the 2 lines at the end (</body> and </html>)
Then in the file above called WP-TNG-footer.php I changed the code: get_footer (); to get_footer (‘tng’); This makes the system load the footer-tng.php file instead of the footer.php.
That part above was the easy part. The website still looks and works fine.
Now I copied the WP theme file called header.php and named it header-tng.php and removed the lines between <!DOCTYPE and </head> but Not the line <?php wp_head(); ?>
Note: My theme “Longevity” had a preloader so I needed to keep that where it was for the theme to display correctly.
Next I coped the TNG Theme file called WP-TNG-topmmenu.php and named it WP-TNG2-topmenu.php
(You could make the changes directly to the original file, but I did this so I could easily pop things back if something goes wrong and also it you want to change themes you can revert until you fix up the new theme files) (Rememeber not all themes are created equal)
I changed the code: get_header (); to get_header (‘tng’); This makes the system load the header-tng.php file instead of the header.php.
Next I coped the TNG Theme file called WP-TNG-meta.php and named it WP-TNG2-meta.php
In this file I copied the meta and link lines that were deleted from the WP header-tng.php file. (if you did not save the line just go back to you original header.php file.)
Now to activate the Header part you just need to go to TNG Admin and
- In Admin>> Setup >> Configuration >> General Settings>> Site Design and Definition > edit fields under custom header use the file names WP-TNG2-topmenu.php & WP-TNG2-meta.php
- Do not close this page until you double checked that your website is looking correct, because you can easily change back to WP-TNG-topmenu.php and WP-TNG-meta.php if something goes wrong.
Now this take care of the head, body and html tags, but not the title tag.
The title tage may not be that important as the “Correct title” is now the first one, but so not to confuse search engines I still would like to remove the 2nd title tag.
I will be working on the title issue next.