Formatting User Functions File for Template Overrides

January 2013 WordPress Theme
GK User
Wed Nov 06, 2013 12:41 am
Hi,

I'm trying to fix my template so I don't lose changes I've made to CSS and PHP files during upgrades. I read that the gavern/user.functions.php file can be used to make modifications that won't be affected by updates. However I'm not sure how to properly format the file so that my site won't crash.

I'm trying to add the following:

Change my date format (as referenced here: https://www.gavick.com/forums/wordpress ... 26748.html) with F j, Y | g:i A T.

Change my featured image on first page only (as referenced here: https://www.gavick.com/forums/news-wp/f ... 26537.html)

Change my page navigation for articles (as referenced here: https://www.gavick.com/forums/news-wp/p ... 25862.html)

I spent the last 4 hours trying to mess with the code to get it right, but get keeping syntax errors in Dreamweaver when editing my php file. I figured there has to be a better way than copying the entire code on those pages when only small edits are being made.
User avatar
Senior Boarder

GK User
Wed Nov 06, 2013 8:59 am
Hi,

user.functions.php file can be used to make modification, but you can put there only functions (filters, actions etc.).

Your modification are not function, you can't do this. The best way is replace all theme files with the latest update and do your modification again.

For the future, the best option for you is to use Child-Theme:
http://www.gavick.com/magazine/gavernwp ... hemes.html
and copy your modified files to Child directory.
User avatar
Moderator

GK User
Wed Nov 06, 2013 11:03 pm
Piotr Kunicki wrote:Hi,

user.functions.php file can be used to make modification, but you can put there only functions (filters, actions etc.).

Your modification are not function, you can't do this. The best way is replace all theme files with the latest update and do your modification again.

For the future, the best option for you is to use Child-Theme:
http://www.gavick.com/magazine/gavernwp ... hemes.html
and copy your modified files to Child directory.


How do I activate my child theme? I uploaded the folder and renamed it to "News-child" but I didn't see it activated as a child theme.
User avatar
Senior Boarder

GK User
Thu Nov 07, 2013 12:02 am
You have to activate News-Child theme (Dashboard -> appearance -> themes). Into News-Child directory copy only modified by you files. (of course you should have original News and News-Child directories inside wp-content/themes.
User avatar
Moderator


cron