[theme-reviewers] How much should I weigh looks, scalability, and functionality?
Philip Walton
philip at philipwalton.com
Fri Apr 15 15:39:53 UTC 2011
Otto, you're absolutely right. It slipped my mind momentarily that a
custom menu would override this (satisfying my previous statement that
theme users should be able to specify which links appear there).
On 4/15/11 8:32 AM, Otto wrote:
> On Fri, Apr 15, 2011 at 10:16 AM, Philip Walton<philip at philipwalton.com> wrote:
>> The theme developer has a callback to this function, which explicitly limits
>> the number of categories to 4.
>>
>> function display_pages() {
>> echo '<ul>';
>> wp_list_categories('title_li=&depth=1&number=4');
>> echo '</ul>';
>> }
>>
>> Ignoring the poor choice of function title, nothing is technically wrong
>> with this function, and no errors are caused when the site contains more
>> than four categories. However, intentionally limiting a menu to four
>> categories with no option to display all seems like a poor decision to me.
>> Furthermore, since the categories are ordered alphabetically, the
>> probability that these four categories are going to be the ones the user
>> wants seems quite low.
>>
>> In my opinion, if a theme is limiting the number of items that appear in a
>> menu, then it should show some sort of "more" link or at least give the user
>> a setting where (s)he can choose exactly which items appear in that menu.
> Taking a look at the code, he's using that as the fallback_cb option
> in the wp_nav_menu call. The fallback is what displays if there's no
> menu defined. So the user can just create a menu, set it to the nav
> menu, and make it display whatever they want.
>
> This is a perfectly reasonable approach. The choice of 4 cats to
> display is not limiting the user, since they can use the Menus system
> to override it.
>
> -Otto
> _______________________________________________
> theme-reviewers mailing list
> theme-reviewers at lists.wordpress.org
> http://lists.wordpress.org/mailman/listinfo/theme-reviewers
More information about the theme-reviewers
mailing list