[theme-reviewers] How much should I weigh looks, scalability, and functionality?

Otto otto at ottodestruct.com
Fri Apr 15 15:32:34 UTC 2011


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


More information about the theme-reviewers mailing list