Author Topic: Modified categories in home/start?  (Read 3808 times)

0 Members and 1 Guest are viewing this topic.

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Modified categories in home/start?
« on: June 24, 2009, 04:22:27 PM »
How to modify the category-box in the home/start?

I'd like to have this way of the box in the home.html:

CATEGORY-TITLE
CAT1CAT2
CAT3CAT4
DROPDOWN-LIST

I've already changed the admin-settings to show 2 categories in each line.
And the Dropdown-Menu should be the same like at the bottom.
So the difficult is: How to limit the cats on the homepage to the only 4 newest?


Update:
I guess it's in the functions.php an the function get_categories
...and around the "foreach"... there how to change to 2 or 4 loops, instead of listening all?
« Last Edit: June 25, 2009, 11:27:38 AM by Schnick und Schnack »

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Modified categories in home/start?
« Reply #1 on: July 02, 2009, 09:51:40 PM »
Noone an idea?  :?

Offline Sebas Bonito

  • Sr. Member
  • ****
  • Posts: 271
  • Sebas Bonito
    • View Profile
Re: Modified categories in home/start?
« Reply #2 on: July 07, 2009, 02:18:07 AM »
I got it  :D

Find this part in the functions.php and the function get_categories
Code: [Select]
    $count++;
    $count2++;
    $categories .= "</td>\n";

After this add
Code: [Select]
if($count == 2) break; The number is how many cats will appear on the home.

There are two probs in this case... it works, BUT
1. not only on home, also IN the categories it will cut the subcategories
2. Only 2, 4, 6 etc. are possible (no even counts)