[Resolved] Enable Sidebar to List 80-100 Items

Home Forums Support Enable Sidebar to List 80-100 Items

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #1512581
    Jim

    We use the right sidebar to list all of the individual articles in each issue of Contemporary Haibun Online: https://contemporaryhaibunonline.com/cho-16-2/

    The next issue will have 80-100 articles. For some reason, not all of our articles are appearing in the right side bar. Does GeneratePress set a limit on how many items can be displayed there? If so, can we increase that limit?

    Below is the email the CHO editor sent to me:

    “I’ve been preparing the next edition of cho, and I’ve run into an issue. We have a lot of material this issue (Terri got a bumper crop of submissions and chose 78 haibun, plus we have a number of articles). This morning I was ordering and publishing the pages in preparation for proofing, and the sidebar menu seems to have run out of room: It stops at Richard Grahn’s Snapshots, and there are still about 20 tanka prose pieces to go. I took a look at the entries after Snapshots and couldn’t see any difference in how they’re set up from what came before, nor can I find anything in the cms about increasing the depth of the sidebar. Would you mind taking a look to see if you can find a solution?”

    #1512635
    Leo
    Staff
    Customer Support

    Hi there,

    Does GeneratePress set a limit on how many items can be displayed there? If so, can we increase that limit?

    No. What widget are you using?

    #1513011
    Jim

    Advanced Sidebar Menu

    #1513308
    David
    Staff
    Customer Support

    Hi there,

    this is probably related to the server settings: max_input_vars – if this is set to 1000 which is quite common it will allow for around a total of 90 menu items.

    You check what the max is set to in Dashboard > Tools > Site Heath -> Info –> Server >>>> PHP max input variables

    You may also want to check if Suhosin is enabled as this can also limit the number of variables.

    Your host should be able to help increase that if you do not have access to .httacccess or php.ini

    #1513365
    Jim

    Thanks, David. This is probably what we’ll do. Or change the way we do that menu!

    #1513373
    David
    Staff
    Customer Support
    #1515424
    Jim

    Reopening. I’d like to try again to solve this issue. To recap: We are using Advanced Sidebar Menu to list all of the individual articles in each issue of Contemporary Haibun Online. Only about 70 or so items are displaying in the right sidebar out of about 90 or 100.

    I set PHP max input variables to 2000. There was no change in the number of menu items/articles that displayed in the right sidebar.

    1. Would setting PHP max input variables above 2000 help, or is that not likely to help?

    2. Would using Advanced Sidebar Menu make any difference, here?

    #1515438
    Jim

    Should have written:

    2. Would using Advanced Sidebar Menu *PRO* make any difference, here?

    #1515596
    Leo
    Staff
    Customer Support

    Did you check with the plugin support on this?

    I’d assume they would have a better idea of what’s going on here as it doesn’t sound like a theme-related issue.

    #1520712
    Jim

    This is what Tech Support for the Advanced Sidebar Menu plugin wrote:

    “By default the plugin has a limit of 100 pages per level. You may change this by adding the following filter to your active theme’s functions.php file.

    add_filter( 'advanced-sidebar-menu/list-pages/parse-args', function( $args ) {
    $args['posts_per_page'] = 1000;
    return $args;
    });

    _______

    I seem to recall that I can add such custom PHP statements through a GeneratePress GUI rather than updating the file. Could you remind me if/how I can do that?

    #1520715
    David
    Staff
    Customer Support

    That type of function has to be added using one of the methods provided here:

    https://docs.generatepress.com/article/adding-php/

    TLDR: If you’re using a Child Theme then it can be added to the Child Themes functions.php, if not you could use the Code Snippets plugin.

    #1520737
    Jim

    Thanks, David. We’ll try the Code Snippets plugin and see what happens.

    #1520740
    David
    Staff
    Customer Support
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.