|
Need small help with PHP code
|
|
02-16-2011, 02:12 PM
Post: #1
|
|||
|
|||
|
Need small help with PHP code
Hi, I try to create a custom categories in Thesis wordpress theme.
I have found the following code, but it assumes that the blog is in the root. Mine is in ./wprs directory. Don't ask me why I did it that way... Please, help me to find where I have to adjust the code... /* Custom Categories */ function custom_archive_info() { if (is_category('apples')) { ?> <div class="post_box top intro_block"> <div class="headline_area"> <h1><?php single_cat_title(); ?></h1> </div> <div class="format_text"> <p>YOUR CUSTOM APPLES TEXT HERE</p> </div> </div> <?php } elseif (is_category('oranges')) { ?> <div class="post_box top intro_block"> <div class="headline_area"> <h1><?php single_cat_title(); ?></h1> </div> <div class="format_text"> <p>YOUR CUSTOM ORANGES TEXT HERE</p> </div> </div> <?php } else thesis_default_archive_info(); } remove_action('thesis_hook_archive_info', 'thesis_default_archive_info'); add_action('thesis_hook_archive_info', 'custom_archive_info'); thanks, Liat |
|||
|
02-16-2011, 02:59 PM
Post: #2
|
|||
|
|||
|
RE: Need small help with PHP code
Hey Liat,
Nice to see someone else using Thesis ![]() What version are you using? |
|||
|
02-16-2011, 03:04 PM
Post: #3
|
|||
|
|||
|
RE: Need small help with PHP code
I use 1.8 version and I find it the best theme ever.
It's a little bit expensive and takes some learning curve to adjust to it, but after you learn the basics and start using open-hooks it is the best! Till now I never had to touch PHP at all, but I really need custom categories... |
|||
|
02-16-2011, 03:12 PM
Post: #4
|
|||
|
|||
|
RE: Need small help with PHP code
Ahhh... From what I can tell... the hook you are trying to use has been removed in 1.8
![]() Try using "thesis_archive_intro" instead... I believe that is the one that has replaced it... Do you have access to the Thesis forums? Normally when I need some guidance with hooks filters i do a search on it and it normally comes up with something I can work with... If you get stuck with that let me know and I'll look a bit further into it for you... |
|||
|
02-16-2011, 03:19 PM
Post: #5
|
|||
|
|||
|
RE: Need small help with PHP code
Thanks, actually I did the search in the forum and this is the best answer I came with.
In this specific case, the hook is not used at all, but custom_function.php file. This only problem that I have to find out how to point to other direction installation.... thanks anyways. |
|||
|
02-16-2011, 05:05 PM
Post: #6
|
|||
|
|||
|
RE: Need small help with PHP code
I can't believe it!
THESIS 1.8 ACTUALLY HAS THIS OPTION BUILD IN!!!! Each category has "Introductory title" and "Introductory content".... I just put there my html code and it works!!! thank you all to helping me find the solution I LOVE THESIS... I just don't like the training material |
|||
|
02-16-2011, 05:15 PM
Post: #7
|
|||
|
|||
|
RE: Need small help with PHP code
Great to hear
And I agree... Thesis is good and it keeps getting better
|
|||
|
« Next Oldest | Next Newest »
|
| Possibly Related Threads... | |||||
| Thread: | Author | Replies: | Views: | Last Post | |
| Small Weather Script for Websites | zEwt | 2 | 563 |
04-23-2012 11:54 AM Last Post: apollo23 |
|
| A small possible programing or script help needed | Ron Boyd | 3 | 1,144 |
01-21-2010 05:11 PM Last Post: Ron Boyd |
|
User(s) browsing this thread: 3 Guest(s)






Thank given by
