Update to WordPress Posts to PDF – Final Version

I have just pushed what will be the last version of my script to export your WordPress posts to a nicely formatted PDF file to my GitHub page.

Firstly, the good news. This version now supports BLOCKQUOTEs which means that the WordPress quote block is rendered in a way that it is more obviously a quote. There has also been an improvement in the output of code blocks but support for this is still pretty basic but does now work.

Now the bad news. While looking at the output from my own sites I found that some posts weren’t … Read the rest

Update to WordPress Posts to PDF – Code Blocks

At the back end of last year I released a script that allowed you to export your WordPress posts to a nicely formatted PDF file. In the last update, I said that I wanted to add proper formatting for code blocks and today I have done that. You can find it on the GitHub page.

This proved to be more difficult than I had anticipated. The code uses the FPDF package and extends out the “Links and flowing text” example provided. I knew I needed to convert all <pre</preblocks to be displayed as … Read the rest

Update to WordPress Posts to PDF

A few weeks ago I released a tool that allows you to export your WordPress posts to a nicely formatted PDF file. I have today pushed some changes to the code which you can find on the GitHub page. This includes the following:

  • Heading (H1, H2 & H3) tags are all now supported
  • List (ordered & unordered) tags are now supported
  • Inline images (not supported) captions are silently dropped
  • A new command line parameter to choose the order of output
  • Progress now shows the number of posts out of the total processed (see image below)
  • Improvements in the
Read the rest

Exporting all WordPress Posts to PDF

I had a requirement to export all my WordPress blog posts into a nicely formatted PDF file and so I looked at plugins that were available to do the job, of which there are a few. I tried some and none worked for me giving no output at all so I decided I would roll my own. Here’s how you can use that code to download your posts to PDF too. You can see an example of the output at the bottom of the post.

To do this required two things: accessing my posts via the WordPress API and … Read the rest

Custom HTML Widget Changes in WordPress

Last week I was asked by a client if I could help them put the Mailchimp newsletter signup form on their site. They had been trying for a while and they couldn’t get the form to appear at all. “No problem” I said, think that this would be a doddle. A couple of hours later I was pulling my hair out as I tried everything I could to get it to work.

Finally I did the inevitable Google search and discovered the at some point recently the custom HTML widget had been changed and that “some HTML tags like script, … Read the rest

Going Secure via Cloudflare (and a Warning)

Forced to be Secure by Google

The more observant amongst you may have noticed that the site is now “secure”. Quite why a blog needs to be so I am not sure but Google is starting to insist on such things so I am in the process of converting all my sites to load via https.

To be honest it has been a bit of a trial, partly because this site runs on a WordPress multi-site installation and that has thrown up a few peculiarities. Anyway, the change from Google has forced me to look at all my sites and … Read the rest

WordPress, Cloudflare, Caching & Version Numbers

While I love WordPress one thing that really bugs me is its insistence on adding the version number to the end of resources, so you end up with links links this:

http://www.spokenlikeageek.com/wp-content/themes/required/style.css?ver=4.4

The version number is added to enable browser caching of files thereby speeding up page loads. The issue with this is if you make a change to the resource it is difficult to get the changes showing without clearing your cache. Additionally, as I am using CloudFlare this step by WordPress is superfluous.

All is not lost however, you can remove these version number by adding the … Read the rest

Flattery as a form of spam

As spam goes this is pretty benign but irritating nevertheless and I have no idea how to rid myself of it.

Just recently I have started to receive messages through the contact form on our website that are allegedly related to our blog posts and they are smothering with kindness and praise for our work.

I blog quite often and I seriously appreciate your information. This article has truly peaked my interest. I’m going to take a note of your site and keep checking for new information about once a week. I subscribed to your Feed too.

When they take … Read the rest

Hacked Off (again)

A dozen years ago, when the web was a very different beast to what it is today I, wrote a series of scripts in the language Perl what was a simple content management system (CMS) to run my websites. Those websites have run using those same scripts with little change over that time. Now I only have  two sites left on that infrastructure and after a hacking this week I have decided that it is finally time to retire the scripts and more the sites to WordPress. I am a bit sad to have to scrap my work but I … Read the rest

WordPress 3.4

So the latest version of the WordPress blogging and CMS platform, on which this and so many other sites are based, has been released. Version 3.4 brings a number of new improvements such as the really neat Twitter integration you can see below. To get this to work you simply need to cut and paste the tweet URL into the editor and you are good to go. So to get the block displayed all I had to do was include the following:

https://twitter.com/spokenlikeageek/status/213251531871490048

I have been playing about with WordPress more and more since the hacking incident, mainly to … Read the rest