• Totally amazing plugin. I love this.

    I have just encountered one issue. I am getting a memory limit from loading too many tags into the menu but there is no way to limit them like there is for posts.

    Seems like it shouldn’t be too difficult to build in but right now I need to find the place to edit code to fix immediately.

    Thanks

    https://wordpress.org/plugins/jc-submenu/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Taylor Baybutt

    (@taxbax)

    For anyone with this issue, find the file SubmenuWalker.php and on line 542 add the number parameter to limit to however many you need.

    'number' => 30

    Plugin Author jcollings

    (@jcollings)

    Hi,

    You can limit the number of taxonomies displayed by using the following filters to edit the get_terms:

    jcs/term_query_args
    jcs/term_{$menu_item_id}_query_args
    add_filter( 'jcs/term_1_query_args', 'jc_limit_term', 10, 1 );
    function jc_limit_term($term_args){
    	$term_args['number'] = 30;
    	return $term_args;
    }

    this function has not been tested, but the example would be modifying the query for the menu item with an id of 1.

    Hope this helps.

    Thread Starter Taylor Baybutt

    (@taxbax)

    Awesome! thanks this works great.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Limit number of tags loaded’ is closed to new replies.