Issue with header and footer since theme update

Hello,

Legacy developer here on a project using X,

Project includes a child theme.
There is a custom header and footer on every page, hearder is using a navbar (class class=“x-navbar-wrap” etc.)

After updating X, custom headers and footer are still there on home and every other pages made with Wordpress, but on custom pages generated by a custom plugin we don’t have header and footer anymore.

Homepage (where it’s still working) is using template_blank_4

Custom pages are generated via twig, calling at beginning a header function that just return get_header() and at the end a footer function returning get_footer().
Good news is we still get doctype, html tag etc. (after testing framework/views/header/base.php from last version of X is called) but no navbar anymore and no custom footer neither.

Any idea how to get that back please ?

Tell me if you need more information to help me.

Thank you for your time.

Hi there,

If you have update to X 5.x the locations of some files were changed like:

/wp-content/themes/x/framework/legacy/cranium/headers/views
/wp-content/themes/x/framework/legacy/cranium/footer/views

I am not sure about how the Twig plugin is setup as it is a third party plugin but knowing the new file locations might help you get started.

Hope this helps.

Let’s forget about the twig (me mentioning it was not relevant),
Doing a custom page with a custom Wordpress plugin in PHP, how to get the X theme header and footer that I got when creating a Page in Wordpress ?
I do not want to modify the theme, just get the header and footer from it on my custom page.
Doing get_header() is getting me something from the X theme (what is in framework/views/header/base.php) but not the same header X is putting on my wordpress pages (when I use template-blank-4 for example)

Thank you for your help

Hi There,

Thanks for writing in! get_header(); & get_footer(); are the correct functions.

For example you can check a sample template located in X theme’s directory.

x/framework/views/ethos/template-blank-1.php

Try checking your error log and see if there’s any errors recorded.

Thanks!

My code is :

<? get_header() ?> <? html_code_of_my_page() ?> <? get_footer() ?>

no child theme.
Old theme X got header and footer with my configured Ethos stack
New Theme X got the base.php header without my Ethos stack (and no errors on wp_debug_log)

Is there a way to create a child theme to get back my Ethos navbar on header ?

Hey @max38320,

You will need to understand x_get_view function which is similar to get_template_part

Please see our customization best practices guide for more details.

This requires knowledge of PHP so you will need to figure out your customization from here.

Thank you for understanding.

Thank you for your help.

My issue with x_get_view is how to get access to the legacy/cranium/ templates please ?

To better understand the structure in X, you need to trace from the general page templates down to the specific parts. Here’s a tip. Getting the legacy structure is still the same as before. If you need the legacy global header for example, you need to use x_get_view( 'global', '_header' );. If you need Integrity’s Landmark Header, use x_get_view( 'integrity', '_landmark-header.php' );

If this doesn’t work for your project, it would be best to hire a WordPress developer.

Thanks.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.