Template Override of Template-Parts?

This topic contains 10 replies, has 3 voices, and was last updated by  Naveen Giri 4 years, 3 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #518339

    identity
    Lifetime Member
    Post count: 445

    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

    #518361

    Alex Rollin
    Moderator
    Post count: 27815

    I 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.

    #518577

    Naveen Giri
    Moderator
    Post count: 1559

    Hi 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

    #518625

    identity
    Lifetime Member
    Post count: 445

    Thanks guys.

    Any examples or details on using hooks to modify?

    Cheers

    #518627

    identity
    Lifetime Member
    Post count: 445

    Let 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

    #518663

    Alex Rollin
    Moderator
    Post count: 27815

    Supreme 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/

    #518703

    Naveen Giri
    Moderator
    Post count: 1559

    Hi identity,

    about hooks use, it depends on what you want to change.

    following are few examples
    https://wpgeodirectory.com/docs-v2/themes/supreme/#customize-single

    Thanks

    #518757

    identity
    Lifetime Member
    Post count: 445

    Naveen, 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

    #518850

    Naveen Giri
    Moderator
    Post count: 1559

    yup, thats a good option with all flexibility.

    #519965

    identity
    Lifetime Member
    Post count: 445

    Thanks 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

    #520224

    Naveen Giri
    Moderator
    Post count: 1559

    thats 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.

Viewing 11 posts - 1 through 11 (of 11 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket