Display pages for single wiki and it's sub-wikis

Is there anyway (built on or by adapting the Wiki widget) to display in a widget the wiki pages for the current wiki and its sub-wiki only.

With the current Wiki widget, it displays all wiki pages, at a certain level (i.e. all top level wikis, then for each top level wiki it will display all sub-wikis according to the level selected) e.g.

Wiki1 - sub1
Wiki1 - sub2
Wiki 2
Wiki2 - sub1
Wiki2 - sub2

What I want, is in the widget to display the wikis/pages from just the current main wiki that I am in. So, for example, if I am on the page "Wiki - sub2" the widget would display

Wiki 2
Wiki2 - sub1
Wiki2 - sub2

(with Wiki - sub2 in bold font, as in the main Wiki widget).

I am wondering if there is already a way to do this, or whether there is anyway to adapt the Wiki widget code to do this.

Ideally, I would like to be able to do this via a single widget, set up once (so the widget identifies the main Wiki and displays all sub-wikis within the hierarchy) but I am also using Custom Sidebars, so I could have a separate sidebar for each main wiki if that is the only way to do it.

Any suggestions? Thanks.

  • Nastia

    Hello @Chris, I hope you are well today!

    Thank you for this question!

    To make it as a widget, this would require a lot of custom coding. I understand it will require a little more time, but for now the best solution is to do this with Custom Sidebars. I suggest to create a custom sidebar with text html, and input a category links like this:

    <a href="http://URL of wiki category" ><strong>Wiki Category</strong></a>
       <a href="http://URL of wiki sub-category" > Wiki sub-Category</a>

    The "strong" tags will make the category fonts bold. Replace the "URL of wiki sub-category" with the URL of wiki sub-category.

    Of course you can always hire a developer to do the widget for you. Please, feel free to post a new job in our Jobs & Pros section on https://premium.wpmudev.org/wordpress-development/

    Please, feel free to let me know if you require any further information!

    Kind Regards,

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.