Posts in Wordpress (2 found)
Chris Coyier 1 weeks ago

WordPress MCP

I’ve still got all my WordPress sites on Pressable and happily so; I think they do a good job! They do everything you’d expect a WordPress host to do. The things I specifically like are: On that last point, I appreciated this little one-clicker: With that on (and presumably because I also use Jetpack and thus WordPress.com?), I can auth an agent like Claude Code that supports MCPs and get it connected. Now I can, for instance, tell my agent to go make a draft blog post quick about something I’m thinking about, so I won’t forget about it. Just to be meta, I’ll have it look at this blog post and make sure I don’t say anything weird about elephants. And it easily caught me! I think I’m more likely to use this for very rote tasks like making sure my headers are Title Case, and things are formatted like I want them to be, matching a style guide. I think it pairs nicely with having a “SKILL.md” file for it, which can be home-base for a style guide like that. The skill could have stuff in it like “only ever touch draft blog posts”, “make sure blocks of code are labelled for what type of code they are”, “make sure images are self-hosted”, “make sure anything I’m linking to looks correct and the link is valid”. I friggin’ hate AI slop writing, so please know I have no interest in automating anything around that. But as someone who has authored and edited one billion blog posts, some intelligent automation of certain rote tasks is appealing. Customer support is good/fast, including free movement of sites Deploying from a GitHub repo is a first-class citizen Perfectly good DNS management No need for extra security, performance, or update plugins Things are generally with-the-grain of the WordPress ecosystem

0 views
Chris Coyier 6 months ago

Help Me Understand How To Get Jetpack Search to Search a Custom Post Type

I’ve got a Custom Post Type in WordPress. It’s called because it’s for documentation pages. This is for the CodePen 2.0 Docs . The Classic Docs are just “Pages” in WordPress, and that works fine, but I thought I’d do the correct WordPress thing and make a unique kind of content a Custom Post Type. This works quite nicely, except that they don’t turn up at all in Jetpack Search . I like Jetpack Search. It works well. It’s got a nice UI. You basically turn it on and forget about it. I put it on CSS-Tricks, and they still use it there. I put it on the Frontend Masters blog. It’s here on this blog. It’s a paid product, and I pay for it and use it because it’s good. I don’t begrudge core WordPress for not having better search, because raw MySQL search just isn’t very good. Jetpack Search uses Elasticsearch, a product better-suited for full-blown site search. That’s not a server requirement they could reasonably bake into core. But the fact that it just doesn’t index Custom Post Types is baffling to me. I suspect it’s just something I’m doing wrong. I can tell it doesn’t work with basic tests. For example, I’ve got a page called “Inline Block Processing” but if you search for “Inline Block Processing” it returns zero results . In the Customizing Jetpack Search area,  I’m specifically telling Jetpack Search  not to exclude “Docs” . That very much feels like it will include it . I’ve tried manually reindexing a couple of times, both from SSHing into Pressable and using WP-CLI to reindex, and from the “Manage Connections” page on WordPress.com. No dice. I contacted Jetpack Support, and they said: Jetpack Search handles Custom Post Types individually, so it may be that the slug for your post type isn’t yet included in the Jetpack Search index.   We have a list of slugs we index here:   https://github.com/Automattic/jetpack/blob/trunk/projects/packages/sync/src/modules/class-search.php#L691   If the slug isn’t on the list, please submit an issue here so that our dev team can add it: Where they sent me on GitHub was a bit confusing. It’s the end of a variable called , which doesn’t seem quite right, as that seems like, ya know, post metadata that shouldn’t be indexed, which isn’t what’s going on here. But it’s also right before a variable called private static $taxonomies_to_sync, which feels closer, but I know what a taxonomy is, and this isn’t that. A taxonomy is categories, tags, and stuff (you can make your own), but I’m not using any custom taxonomies here; I’m using a Custom Post Type. They directed me to open a GitHub Issue, so I did that . But it’s sat untouched for a month. I just need to know whether Jetpack Search can handle Custom Post Types. If it does, what am I doing wrong to make it not work? If it can’t, fine, I just wanna know so I can figure out some other way to handle this. Unsearchable docs are not tenable.

0 views