A Nice Upgrade

I did some php programming in my custom WordPress theme, and gave it a new ability. Now on each page I can embed related pages, which previously only appeared as links in the sidebar ( and still do. ) While it is possible to embed anywhere, the sensible place is at the end, after all the content. Embedding a page in the middle of another page would probably be confusing. Actually, when a page is embedded, only the beginning of it is displayed, with a link to the whole thing. Then I got an even better idea, and added the page's 'parent' to the list. I also made some formatting changes so that each embedded page is clearly a separate entity.

What is really cool about this for this website is that now every dive site's page now includes the relevant charts. This is something I always had in the back of my mind, but I never thought of an easy way to do it across hundreds of pages, until now. Once the code was finished, it took just a single change in the WordPress setup to make it happen.

Embedding works for both pages and blog posts, anything can be embedded in anything else. The actual php coding was knocked-off something I wrote a long time ago, and was really not at all difficult. I don't know why it took me so long to think of it.


October 23, 2022

I fixed up the auxiliary navigation 'bugs' at the lower-right edge of the screen. I added a 'home' bug and a 'search' bug, so those two functions are always available, no matter how far down you have scrolled. That pop-out search box has been itching in the back of my mind for a long time; turns out it was pretty easy - it uses the same code as the sidebar search box. While I was at it, I fixed up some form formatting issues, and even added 'Tool Tips' to the 'bugs'. The 'Random' bug now has a 'random' icon.

With a site this size, every kind of navigation helps. My 'theme' takes WordPress way beyond its intended purpose of posting pictures of your lunch. Unfortunately, if I submitted the theme to WordPress, they would reject it for not conforming to their 'standards'. I tried submitting the slideshow plugin, but eventually I got tired of fixing their nitpicks and gave up. They would really hate what I've done to the WP back-end, my version is completely different from 'stock'.


Printed from njscuba.net