As I was looking at repurposing my local WP install on my laptop in light of the wiki experiments I mentioned yesterday, I wanted to add the Category to Pages plugin I use on my blog to my local WP instance. Turns out that plugin was closed 18 months ago. I never noticed, as a WordPress install does alert you to plugins that have updates available, but clearly doesn’t warn you if a plugin is no longer being maintained. It seems the developer has closed down all his WordPress activities, with accounts deleted, his domains let go (except for his main one).
I use the Category to Pages plugin on my blog to be able to use Pages as a one-person wiki. The categories provide navigational structure, and make having hub pages easy (through category archives). There is one similar plugin that has been maintained in the past six months, which possibly is a replacement. I would need to check if it can take over seamlessly from the previous plugin, or that I need to recreate the categories and tags for pages that are currently in use. Alternatively, although the old plugin can’t be downloaded anymore, I can copy the old one over to my local WP instance for now. But probably better to have both WP instances use a plugin that is maintained.
In reply to https://www.zylstra.org/blog/2020/04/the-plugin-that-disappeared/.
You shouldn’t have to recreate anything. It’s really easy to enable categories and tags (and other taxonomies) for all sorts of post types, including pages, and I’d be quite surprised if this plugin deleted any terms on uninstall.
I don’t think the plugin will delete anything upon uninstalling, as uninstalling is just throwing out the folder of files. I am however assuming that the changes the existing plugin made in the database will not be picked up or used by another plugin seeking to provide the same functionality. This as I assume that both plugins will use specific fieldname prefixes to be able to find ‘their’ data back in the WP database.
In reply to https://www.zylstra.org/blog/2020/04/the-plugin-that-disappeared/#comment-133667.
Had a quick look at the plugin’s source and, interestingly, it does include an uninstall script, which I think WordPress registers before anything is deleted, so it can be run afterward. (Looks like it would try and delete—some?—plugin options.)
That said, (simply) enabling categories for pages literally takes one line of code: register_taxonomy_for_object_type( ‘category’, ‘page’ );. Of course if you wanted different categories (i.e., not the same set of categories “posts” use), that’d be a couple lines more.
I am indeed using unique categories on this site for pages. Will have a look at the plugin code. I don’t need many fancy options, just the ability to categorise and make a distinction between pages and posts (which I assume doesn’t have to mean separate categories, as posts and pages are of a different type already anyway).
What I’ll test is a) how the current plugin adds stuff to the database, and b) if I can do it simply by adding that line of code you mention to my own plugin in which I keep various functions.
In reply to https://www.zylstra.org/blog/2020/04/the-plugin-that-disappeared/#comment-133728.
In that case, I’d probably opt for a custom taxonomy. Anyhow, I had another super-brief look and it does contain that line of code (and a similar one for tags), plus code to register two custom taxonomies aptly named “categories” and “tags.” (I believe WordPress’s built-in taxonomies are “category” [singular] and “post_tag.”) Plus a whole lot of code I think might not be needed, strictly speaking—think admin pages, or widgets.
Using your site-specific plugin, you could fairly easily reregister these taxonomies, display terms underneath posts, and things like that. And everything would still be there, even if it looked a bit different. (With the help of a child theme, you could even add your own archive templates, and so on.)