![]() |
|
|||
|
Hey Guys!
I know there was a bit of panic when Thesis v1.2 came out and suddenly your changes to the core files were gone and you weren't sure where to put them back in. The bad news is that you'll have to do a bit of shuffling to put your custom code back in. The good news is that this version of Thesis is freakin' awesome. It's possibly the best WP theme on the internet, customising is going to be easier now (with the hooks that Chris has provided) and these customisations will be fairly future proof — no overwriting when you upgrade and no more shuffles. The key to customising Thesis is the files in the custom folder — custom.css and custom_functions.php. Most of you are familiar with the CSS, and there's some documentation in the user manual. I'll talk about functions. Open that custom/custom_function.php in your plain text (or html) editor. You'll see that there's already a sample function there for you to use. PHP Code:
The bookmark links function puts a list of social cookmarking links wherever you tell it to. You could call this function somewhere in your theme by inserting, PHP Code:
The method of "telling" WP to insert this code is to use PHP Code:
PHP Code:
PHP Code:
PHP Code:
Code:
wp_head thesis_hook_before_container //inside #header thesis_hook_before_title thesis_hook_after_title //inside #content thesis_hook_before_content //inside .format_text.entry-content thesis_hook_before_post thesis_hook_after_post thesis_hook_after_content thesis_hook_before_archive_info thesis_hook_after_archive_info //inside #sidebars //before MM box thesis_hook_before_sidebars //after MM box thesis_hook_after_multimedia_box //inside #sidebar_1.sidebar ul.sidebar_list thesis_hook_before_sidebar_1 thesis_hook_after_sidebar_1 //inside #sidebar_2.sidebar ul.sidebar_list thesis_hook_before_sidebar_2 thesis_hook_after_sidebar_2 //inside #footer thesis_hook_footer wp_footer thesis_hook_after_container Here's an image of where the hooks go into your web page (approximately): ![]() NB When adding to the custom_functions.php file, please add your code after the last PHP Code:
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff Did you try validating? How to ask questions the smart way – help us to help you Last edited by kristarella; 10-06-2008 at 03:51 PM. Reason: Common mistake |
|
|||
|
kristarella, you rock!! An excellent post. Thanks.
|
|
|||
|
Maybe this could help. I have included my custom_functions.php file that uses the following hooks -
Here's the code: PHP Code:
|
|
|||
|
Thanks folks! Glad you found it helpful.
Thanks for sharing you code indianguru
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff Did you try validating? How to ask questions the smart way – help us to help you |
|
|||
|
Hey IndianGuru,
Thanks for sharing your code too ![]() I am just thinking aloud, but is it possible then to use custom functions to activate the thesis_widget_recent_posts in the sidebar.php? Code:
thesis_widget_recent_posts('asides', 'Recent Asides', 6);
Last edited by patch; 10-04-2008 at 06:53 AM. Reason: Solved |
|
|||
|
Great Post kristarella. Thank you for bringing further clarity to the customization process.
I was hoping someone could help with some custom function syntax... I have utilized hooks & a custom function to insert a snippet of HTML directly before each post ('thesis_hook_before_post'). The code I have implemented works nicely (thanks to the information provided in this post) but I wish to RESTRICT this from showing up on the HOME page (which provides a summary of my recent blog posts). I would imagine that I would add some logic (i.e. an IF statement) to my custom function that would stop my HTML snippet from showing up on my home page. But I am not familiar with php code (or available thesis function calls). Is there an available function to call to restrict my HTML snippet from rendering on my home page...something like [if (!home-page()..]? Or is there another way to accomplish this? Any help would be greatly appreciated. Thanks. |
|
|||
|
Quote:
![]() PHP Code:
Quote:
__________________
kristarella.com – a blog about design, photography, Macs, Christianity, and other random life stuff Did you try validating? How to ask questions the smart way – help us to help you |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Tutorial: Copying Thesis settings to a new blog via cut & paste and phpMyAdmin | pbarron | Resources and Tutorials | 6 | 10-28-2009 06:39 PM |
| Tutorial: Random Rotating Header Images for Thesis | seekingff | Resources and Tutorials | 52 | 06-15-2009 05:49 PM |