From the Wiki:
Quote:Add the file /path/to/getsimple/theme/your-theme/functions.php into your theme to add custom functions that can be used within your theme.
Can someone explain that to me please?
Where do you get this file? What are these custom functions? Do I have to write it myself?
It's simply an optional file a theme author might like to include with any custom functionality for that theme. Whether you (as a theme author) include a file called functions.php and what it contains is up to you.
Timbow Wrote:From the Wiki:
Where do you get this file? What are these custom functions? Do I have to write it myself?
I think you will find a good overview on the 'function.php' file by reading this addendum to my tutorial on outlining.
http://eatons.net/tutorials/innovationoutline/addendum/
Sorry to bump this back up.
I'm trying ot add my scripts in the function.php but am having a bit of a fuss getting it to work.
Here is what I have so far. I kind of like working this way instead of adding them directly into the template.
PHP Code:
function add_scripts() {
echo "<script src='". get_theme_url() . "/js/utility.js'></script>";
}
add_action('theme-header','add_scripts');
Yeh...not working. It prints out the url but not in the script tag.
(2013-10-10, 12:31:31)lnickel Wrote: [ -> ]PHP Code:
function add_scripts() {
echo "<script src='". get_theme_url() . "/js/utility.js'></script>";
}
add_action('theme-header','add_scripts');
Yeh...not working. It prints out the url but not in the script tag.
Replace
get_theme_url() by
get_theme_url(false) to return the value instead of echoing it.
One step at a time!! LOL!!! thanks Carlos!!! Little by little I'll get the hang of it!!