Scroll to top

21/01/2021

2021/01/21#p2

0 comments: click to leave a comment

The rebuild of the Garden home page didn't need the custom walker after all. By adding a filter to wp_list_pages() (which I remove if not logged in) I am able to run a series of preg_replace() functions to restore the inline page deletion and section expand/collapse toggles.

The performance is far superior to running multiple nested queries so it's a big win and shouldn't be impacted too much regardless of how large the garden grows.

Update: The only snag is that I can't separate out the page delete feature and toggles so it's all or nothing. What I may do is move page deletion to the page itself, then I can have the toggle regardless of being logged in or not.

Leave a reply



You can also:

Reply by email Reply by email Send a webmention Send a Webmention

Colin Walker Colin Walker colin@colinwalker.blog