Archived topic
Custom fields "single.php"
3 replies · Started by Israel on October 22, 2019
Hello:
I'm trying to make some "Custom Fileds" but with one Custom Field everything is ok, but when I try to do a newone I have problems with the single.php of the theme, because the field appears in all the custom fields. So I think I have to build a new single.php with other name "single2.php" for example, for the new custom Field. I've tryed but I can't. Could you helpme please.
Thank you very much.
Hi there,
how are you creating the custom fields and how are you displaying them in the single post?
Hi David:
Y use GenerateWP (a web) that give me a code to put into a plugin "Pluginception" and then I create a new plugin.
Thak you very much.
Why not use the GP Hook Element to output the Custom Fields you require? You can then select which fields are displayed and on which posts:
https://docs.generatepress.com/article/hooks-element-overview/