modifying a template and adding jQuery to it
There is a page template called "All Bookmarks" for displaying all links grouped by category. I want to modify it 2 ways:
- each category of links should be collapsible/expandable by clicking on the category header
- the template should accept a list of categories to either include or exclude
For the collapsible part, assumably I need only add a class to each category header so that my jQuery code can affect them. For the category limiting, assumably I need a way to pass parametres to the template. However, I'm a complete noob to WP and I don't know
- where to put the jQuery code
- whether to add the class to the template, or to create a new template
- where to store a new template so that it will be available to Pages
- if templates can take parametres or if a template needs to refer to a custom PHP function
- where to store custom PHP functions
I've been wandering around WordPress.org for a while becoming more and more frustrated. I'd appreciate it if someone could address the above questions and perhaps point me to a good explanation of WP code structure.
Thanks!
Version: WP 3.1
Theme: Suffusion 3.7.7