Home › Forums › Free Themes › Pet Business › Make Theme child theme friendly
- This topic has 6 replies, 3 voices, and was last updated 3 years, 7 months ago by
chase2.
-
AuthorPosts
-
October 13, 2021 at 10:55 am #158986
wc.smith@sbcglobal.net
ParticipantWould you consider making this theme child theme friendly. For example, the theme has lots of require statements, even in the functions.php file.
I am wanting to use this theme as a parent to a child theme and in the child theme I am wanting to change the number of sliders on the front page from 3 to some higher number. With the require statements this can’t be done.
Thanks for your consideration,
Warren
October 13, 2021 at 11:16 am #158987Psink
KeymasterIt is not possible to increase the number of post to show in the slider because there is no way to override the customization code of the slider section.
I recommend you to use a Pet Business Pro
October 13, 2021 at 12:06 pm #158988wc.smith@sbcglobal.net
ParticipantYes, that is exactly what I am asking you to consider. For a theme to be child theme friendly, your functions should allow for override with an If function exists statement. That way when the child theme modifies a function your parent theme won’t try and load it again.
Thanks for the consideration,
Warren
PS I can make changes to the appropriate slider.php files in the pet-business theme to extend the number of sliders, but it would be better if that could be done in a child theme.
October 13, 2021 at 12:37 pm #158991Psink
KeymasterIn that case we can duplicate the slider section with the new function name and add a required customization code in the child theme
for that you can check our newly released child theme Corpo Music
October 13, 2021 at 1:52 pm #158993wc.smith@sbcglobal.net
ParticipantSo do I understand from your last post that you will modify the pet-business theme?
Thanks,
Warren
October 14, 2021 at 11:12 am #159019wc.smith@sbcglobal.net
ParticipantThanks for all your guidance. I have figured out a way to use the init action to replace the main customizer code in the parent, so that now the theme loads with the child theme customization vice the parent customization for the slider section only.
Once again, thanks for the support.
Warren
March 28, 2022 at 4:53 pm #180349chase2
ParticipantHi everyone,
I am new in this discussion, so I want to ask something about themes, I have to make a website related to businessman portfolios, anyone can suggest to me what theme is best for my website, have a look at the website, and drop your opinion.
https://dataromas.comThanks
-
AuthorPosts
- You must be logged in to reply to this topic.





