Cross Stroke
  • Work
  • About & Services
  • Contact & Hire
  • Blog
  • Work
  • About & Services
  • Contact & Hire
  • Blog

Disable search, author, attachment, and date-based archives

October 12th, 2019

If the WordPress site you’ve built doesn’t make use of search, author archives, attachment links, or date-based archives, those pages are generated and people can stumble across them. So, just turn them off, right? Unfortunately, to the best of my knowledge, there isn’t a simple switch for that. Instead, you have to go about it another way. What this does,…

Upgrade jQuery in WordPress

October 11th, 2019

Generally speaking, you don’t want to touch the versions of libraries used within WordPress admin. But the front-end is another matter entirely, if you’ve built a totally custom theme. So let me explain this a bit. We first de-register the built-in version of jQuery, and re-register it with a new version, this time loading from Google’s CDN, and include in…

Stop WordPress loading Gutenberg Styles

October 9th, 2019

If you want to stop WordPress from loading in the styles that come along with Gutenberg, this one’s for you. Just be sure to add in your styles and scripts, if you’re loading them this way. (Note: The above code works, but is simplified. Read the docs to see how to expand this to suit your needs) It’s worth noting…

Simplify TinyMCE Text Style Options

July 2nd, 2019

It’s generally accepted in the SEO world that you should only have one h1 tag on each page. While opinions may differ on that (especially if you build correctly and use tags like aside and main), the ability to remove some options from the dropdown of styles is very welcome. Drop this into your functions.php file, clean up the TinyMCE…

New website, new portfolio

July 1st, 2019

It’s been a while hasn’t it. Years ago, I always thought there was no excuse for a web designer or developer having an old & outdated portfolio, but now I see why. The good ones are so busy with client work, and put all their energy into their clients sites. Makes sense now I think about it. I had a…

wp_list_pluck();

June 10th, 2019

Quite often, I use an ACF Post Object field to let the client chose a multiple number of items. That returns an array of post objects. If I want to get the ID for each of those post objects, you could loop over it. Or, let WP abstract that away with a little helper function. Enter wp_list_pluck(). We now have…

Customise TinyMCE Buttons

January 7th, 2019

If you, like me, are mostly disabling Gutenberg for all the things, you’re probably also looking to simplify the UI where possible. I remove a few buttons and type styles from TinyMCE, so the client can only chose from stuff that won’t ruin the design of the site they paid a lot of money for. The only way they can…

Selectively Disable Gutenberg

January 5th, 2019

Like many developers, I have a starter theme. Mine’s called Origin. It has a lot of stuff specific to a particular type of project I do often, so it’s not open source. But, there’s a lot of gems there which may be useful to others. I’m going to start sharing them here, and add some Category nav items to the…

© Copyright 2021 Cross Stroke Limited
—
Company No. 09589832
—
VAT No. GB 297334468
  • Link to Hayley Jade Design Studio
  • Link to @pauladamdavis on Twitter
  • Link to @pauladamdavis on Github
  • Email link to paul@crossstroke.co