Missing file? _landmark-header.php

I’m doing custom template edits in the file themes/x-child/framework/views/renew/_landmark-header.php.

But I can’t find the equivalent file in the main theme. I’m looking in themes/x/framework/views/renew. Is it normal to be missing this file?

Hi There,

Thanks for writing in! With the introduction of X5, those files have been moved to the following location.

x/framework/legacy/cranium/headers/views/

Hope that helps.

Great, thanks.

Should I create a legacy folder in my child theme for my custom template file? Like this:

x-child/framework/legacy/cranium/headers/views/renew/_landmark-header.php

Hi There,

Yes if you want to override the file, simply create the same directory structure in your child theme and then you can copy the original file into that path and finally you can add your customizations.

Thanks!

My custom template seems to work in either directory. But I guess it’s probably best to use the new legacy folder.

Question: has _landmark-header.php been replaced by a new template file in X5? Would it be better to use the new template files instead of the legacy ones?

Hi There,

There are changes and new additional files, so it is always a best practice to copy the original file from the updated parent X theme to your child theme.

Thanks!

Yes, of course.

Sorry, I wasn’t clear enough. My question is should I stop using _landmark-header.php because it is now legacy, and instead use a different template file? Perhaps content-page.php or _content-post-header.php?

Thanks for your help

X is backwards compatible with the previous structure that is why it works it works in either directories. You should still use that _landmark-header.php. It has only been restructured in preparation for the release of Pro and future additions.

Thanks.

Oh I see. Awesome, thanks @mldarshana and @christian_y for answering all my questions. Very helpful!

You’re always welcome!

Cheers!