Archived topic
Do I need a child theme when creating a template file?
1 reply · Started by Robert on January 4, 2023
Hi,
I am trying to bring in an API to display an up-to-date stock/share price within the Directories Pro plugin.
I have contacted the directories pro people and have had the following reply:
You will need to create an element template file and use some PHP code in that file to fetch the information you need from the API. You can then select that element template file from the Manage Displays section for listings in your directory. For information on element template files, please see https://directoriespro.com/documentation/advanced-customization/template-files.html
In this it suggests I need a child theme.
Having reviewed the help for GP they suggest some aspects of PHP can be done without a child theme.
As I need to create a file I assume this cannot be done within GP?
If I have not created a child theme before is it something I should really get an expert to do?
Any suggestions are very welcome.
Thanks,
Rob
Hi there,
for custom PHP templates like that, you need to install a child theme, you can't save them in the parent theme folder as it will get overwritten when the theme is updated.