Archived topic
Change Featured image position
7 replies · Started by Ramsha Afzal on October 27, 2021
Hi,
Before theme update, I put a function in the functions.php file to change the featured image position after the second paragraph and disbaled it from the theme customize options.
After theme update, the code was removed and now the featured image isn't showing on any blog or articles. I want all to be back to their previous places i.e. after the second paragraph of each article.
I put the same function in the functions.php but now it isn't working.
Please help me.
Thanks
Hi,
I have fixed it but One most important thing I want to ask and that is about the update. Is it possible that after the theme update, the functions.php doesn't change?
Because as you see, when I updated the theme, all the functions, I inserted, including the last updated date of blogs and featured image position were removed.
Regards
Hi there,
when WordPress updates a theme ( any theme ) it replaces the entire theme directory. So you should NEVER edit the parent themes files or those changes will be lost.
If you need to add to the functions.php file then you should use a Child Theme.
This article explains adding PHP:
I am using generatepress marketer template. Now let me know what could be the solution?
If I use the plugin Code Snippets to make changes to functions.php, will the changes remain saved even after the parent theme update?
Yes .. if you use Code Snippets then those changes remain saved even after the parent theme update
Thank you so much :)
Glad to be of help!