PHP functions


#1

Hi so I have already created a sit using text wrangler and phpmyadmin. My site looked terrible so I am now using the sydney theme. I like the sydney theme, but I am confused how to go about adding my functions and backend work to the sydney theme. I have written up several PHP functions to go along with my site but I don’t want to mess anything up in the Sydney theme. I would like to run these PHP functions after a submit button is pressed on one of my pages. I would like to echo some certain things to my page and do backend additions to my database.

I also was wondering if you had any idea where a callback to my site may be located and how to find it. I didn’t know if that would stored in a specific folder that I could look through.


#2

Hello there,

Functions have to be added like this inside functions.php file:

<?php
if (function_exists('FUNCTION NAME')) {
 FUNCTION_NAME();
}
?>

Read more here https://codex.wordpress.org/Managing_Plugins

And since you want to add yours, it is god practice to use child theme https://codex.wordpress.org/Child_Themes

Please note that since you want to modify theme, and it’s default functionality, we are not in position to provide help. If you are not up to the task, plese hire someone, or contact Codeable for example.

Thanks for understanding.