Limit Number Of Entries In Latest Wikis Menu Widget

As the widget and plug-ins to make it a drop-down menu don't work, is there a way I can limit the number of entries that show in the Latest Wikis widget. It seems kind of basic, that you should be able to limit the number displayed to 5 or 10 of the latest Wiki entries.

  • Predrag Dubajic
    • Support

    Hey @wikifu,

    Hope you're doing well today :slight_smile:

    I agree that this could be nice feature to have so I'm going to move this thread to Features & Feedback section so our developers could consider adding this option in future.

    As for the quick workaround we can make the change directly in plugin files to limit number of posts but please note that such changes are overwritten with plugin update so you will need to do them again.
    So, to limit number of posts in widget you need to go to wiki/lib/classes/ folder and download WikiWidget.php file, around line 40 you should be able to see this line of code:
    'numberposts' => 100000
    Change the value from 100000 to 5 or 10 (or any other number of posts), save the changes, upload the file to its original location and that should be it.

    Best regards,
    Predrag

  • Predrag Dubajic
    • Support

    Hi @wikifu,

    If you have FTP access you can go to folder mentioned before, full path should be something like wp-content/plugins/wiki/lib/classes/ and in that folder you should see WikiWidget.php file.
    Download that file and basically you can use any text editor to change it but I would suggest going for SublimeText to make those edits.
    Once you open the file in SublimeText you can search for the line I mentioned above:
    'numberposts' => 100000
    And change it so it looks like this:
    'numberposts' => 5
    Save the changes and upload the file to it's original location.

    If you are having troubles with this please tell me number of posts you want to show and I will make the change for you and attach a file here for you to download.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.