[wp-trac] [WordPress Trac] #31724: Multiple calls get_terms() when: custom taxonomy (with no posts in it) and wp_nav_menu

WordPress Trac noreply at wordpress.org
Sun Mar 22 14:07:28 UTC 2015


#31724: Multiple calls get_terms() when: custom taxonomy (with no posts in it) and
wp_nav_menu
-------------------------------+------------------------------
 Reporter:  kg69design         |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  General            |     Version:  4.1.1
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:  performance
-------------------------------+------------------------------
Changes (by boonebgorges):

 * keywords:   => reporter-feedback


Comment:

 Hi kg69design - I'm not able to reproduce this. It's possible that you'd
 see an increase in database queries if `get_terms()` were not properly
 caching the results of a query that returns no terms. But it's not clear
 to me how such a call would be taking place inside of
 `wp_get_nav_menu_items()`. Do you have some custom code in place that adds
 taxonomy archives to your nav menu? Are you able to reproduce this problem
 on a WP installation with no plugins or custom themes (except for the
 `register_taxonomy()` code in question)?

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31724#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list