Template Override of Template-Parts?
This topic contains 10 replies, has 3 voices, and was last updated by Naveen Giri 5 years, 12 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: template overrides, templates
-
AuthorPosts
-
November 22, 2019 at 6:54 pm #518339
Following the information noted here: https://wpgeodirectory.com/docs-v2/faq/customizing/#templates
Does that work for the “header-single-top.php” file located in “template-parts/header?”
I tried modifying a copy and saw no changes. As instructed, I created a “geodirectory” directory within “/wp-content/themes/supreme-directory/” and made changes in the file at that root, as well as in subfolders of “template-parts” and “template-parts/header” in case it followed a similar “lookup” path as the original file.
Thanks
November 22, 2019 at 10:06 pm #518361I do not believe that will work with Supreme because it is already a child them.
It is not recommended or support, but, if you are going to modify the files already you can rename the theme to turn off updates and then edit the files directly.
https://developer.wordpress.org/themes/advanced-topics/child-themes/
I have asked the developers to weigh in on the subject if they know differently.
November 25, 2019 at 6:49 am #518577Hi identity,
I agree with Alex. Supreme itself is a child theme. you can create similar with your custom template.
or you can also use action and filter mention in header-single-top.php. if thats work for you.Thanks
November 25, 2019 at 2:58 pm #518625Thanks guys.
Any examples or details on using hooks to modify?
Cheers
November 25, 2019 at 4:06 pm #518627Let me ask a secondary question also…
With the thought of forking to my own theme and then doing a manual diff-merge of Starter and Supreme and carefully porting over edits, how often would those themes likely be updated?
I know that is unknown, but some kind of guess based on history would be useful. I realize that there core and addons may get updated quite a few times throughout the year, but was thinking the themes may be a bit more stable…?
Cheers
November 25, 2019 at 10:40 pm #518663Supreme itself is an example because it is built to modify Directory Starter.
We don’t date our changelogs but, we update roughly every other month for Supreme, sometimes more often.
Click on the version number in the header here to see the changelog.
https://wpgeodirectory.com/downloads/supreme-directory/November 26, 2019 at 5:42 am #518703Hi identity,
about hooks use, it depends on what you want to change.
following are few examples
https://wpgeodirectory.com/docs-v2/themes/supreme/#customize-singleThanks
November 26, 2019 at 3:18 pm #518757Naveen, thank.
Actually I tried using that example to modify address (initial post at top of thread), but wasn’t able to. It this point I think it might be easier to just fork over to a custom theme and then manually update as need be.
Cheers
November 27, 2019 at 8:46 am #518850yup, thats a good option with all flexibility.
December 4, 2019 at 7:33 pm #519965Thanks for all the feedback.
As I look to mod Directory Starter / Supreme Directory, I noticed various references to “supreme-directory” in the code similar to the following:
title="<?php echo __( 'Share on Facebook', 'supreme-directory' ); ?>"Do those need to be changed? If so, to what?
Cheers
December 6, 2019 at 6:43 am #520224thats a locale use to add translation of string.
it should be replaced with the Text Domain string of your theme.if you don’t have need of any translation. you can let it be.
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket