I’ve been working for some time towards moving my blog off of WordPress, towards a simpler and static friendly setup. In that interest, I have made a PHP script to copy the site data to a Markdown directory structure and copy the media files, called WP to Markdown. The file and folder structure is largely based on the URL path structure of a WordPress site using the default permalink structure. This will help me to reproduce a similar structure with the software that replaces WordPress, which I am in the process of writing.
Continue reading post "Project: WP To Markdown"wordpress posts
Symfony templates for WordPress pages
I’ve been using Symfony for all of my site pages except the blog, which is run with WordPress. Originally I was using a standard WordPress theme that made my blog look different than the rest of my site. I had looked into ways to pull WordPress through a controller action and stuff like that, but ran into difficulties. I ended up using a solution where WordPress functions as normal for the subpath that it is in, but code in a custom theme boots the kernel from the Symfony part of my site and uses the twig service to render the template. Output buffering is used to capture the normal output of the site to pass to twig.
My theme code does some other things, but I will try to present a stripped down version that could work with a Symfony Standard Edition site for the purposes of this post to hopefully help others do the same.
Continue reading post "Symfony templates for WordPress pages"WordPress dark mode for admin, quick and dirty
I have been loving that so many apps and sites have been moving to supporting dark modes. I find it easier on my eyes, especially in the evening / night. One place that I frequently visit that I’m disappointed doesn’t support dark mode yet is WordPress’s admin area.
There is a Dark Mode plugin that can add this, but it is primarily for the front-end of the site, which in my case already has a dark mode and I didn’t want to touch. Plus it’s a lot of third party code for something that should be built in and probably will be at some point. I decided it was time to look into if I could just inject a quick and dirty stylesheet to change some colors and improve the situation for now.
Continue reading post "WordPress dark mode for admin, quick and dirty"The xmlrpc.php file of my WordPress blog recently got hit by a single bot some 5000 times over a half hour period recently. I temporarily disabled all visitors and then limited it to just blocking the specific IP via Apache conf (htaccess).
Checking if WordPress post has more
WordPress offers the has_excerpt() method to determine if you create a separate excerpt on a post, but does not seem to have a built in function to ask if it uses the special comment <!--more--> for an excerpt coming from the beginning of the post content.
Not sure what happened, but the Jetpack Markdown plugin setting got turned off by itself.
Continue reading post "#2456"Cleveland GiveCamp 2019: day one
The tenth annual, and my ninth, Cleveland GiveCamp started today.
Continue reading post "Cleveland GiveCamp 2019: day one"I updated to WordPress 5, but had to use the classic editor plugin.
Continue reading post "#2157"Welp, got my first pingback / trackback spam since I closed regular comments about a month ago.
Continue reading post "#2019"Apparently, callbacks to the WordPress function add_filter() don’t receive more than one argument to their callback unless you specify the fourth argument to the add call as a number greater than 1.