If you use custom taxonomies in WordPress, they don’t automatically get added to the new Gutenberg block interface. Fortunately this is an easy fix: you need to add an extra parameter to the arguments you set when you first define your taxonomy. Read more at edinburghwp.com
Tech: Posts not loading in the WordPress app?
If you’re not able to load your website’s content in the WordPress iOS app, an old version of JetPack might be the problem. Read more at edinburghwp.com
Tech: Debugging WordPress Media imports
Importing files and posts into WordPress is sometimes a bit of a black art – there are lots of places where things might go wrong. Changing the upload_url_path value for your site might cause problems with WP export files – here’s how to fix it.
Cross-posted from edinburghwp.com
Tech: Removing auto-generated WordPress thumbnail images
Removing auto-generated WordPress thumbnail images
WordPress themes can generate a wide range of thumbnail sizes – and it’s not obvious how to delete sizes you don’t use anymore. If you can mount your upload folder on your Desktop, you can easily select and delete all the thumbnails WordPress has generated using the right tools. This post tells you how to do this on a Mac.
Cross-posted from edinburghwp.com
Tech: Working with excerpts in WordPress, or why isn’t this filter working?
If you call get_the_excerpt() WordPress returns a string that looks like an excerpt – but it might be an automatically generated word-counted trimmed-down chunk of the post’s content. Here’s how I filtered get_the_excerpt()
to get the results I wanted.
Cross-posted from edinburghwp.com
Tech: Working with excerpts in WordPress, or why isn’t this filter working?
Working with excerpts in WordPress, or why isn’t this filter working?
If you call get_the_excerpt() WordPress returns a string that looks like an excerpt – but it might not be . If your post doesn’t have a handcrafted excerpt, WordPress returns an automatically generated word-counted trimmed-down version of the full post content – and this may not be what you want. Here’s how I tweaked the code to get post excerpts as I wanted them.
Cross-posted from edinburghwp.com
Tech: How to add a new Page Template to WordPress
There are two things you need to do if you want WordPress to use Page Templates…
Cross-posted from edinburghwp.com
Tech: How to remove your front page from WordPress search results
If you use a static front page for your WordPress site, you may (or may not) want it to show up in your site’s search results. If you want to exclude your front page from your search results, use this code.
Cross-posted from edinburghwp.com
Tech: The best way to customise the categories widget in WordPress
You may not like how WordPress’ Categories widget lists categories – particularly if you want to modify or customise the list that’s displayed. Learn a simple, easy (and code-free) way to customise the Categories widget display.
Cross-posted from edinburghwp.com
Tech: You’ve created a custom post type, but WordPress says your posts can’t be found…
What to do if you’ve created a new Custom Post Type, but you get 404 errors when you try and load posts.
Cross-posted from edinburghwp.com
Tech: Removing page, post, tag, category, and taxonomy IDs from the body_class in WordPress
Here’s a filter you can use to convince WordPress to remove CSS classes for tags, categories, pages, posts and taxonomies.
Cross-posted from edinburghwp.com
Tech: How to stop WordPress adding responsive images to your RSS feed
If you like to customise how WordPress builds RSS feeds, this code will stop WordPress adding ‘srcset’ attributes to images in the RSS feed.
Cross-posted from edinburghwp.com
Tech: Make WordPress load a functions file only on a login page
If you want to only load a file (or action or filter) only on the login page, then use this logic snippet.
Cross-posted from edinburghwp.com
Tech: How to stop WordPress loading styles on your login page
A code snippet that will limit the number of extra CSS files WordPress and JetPack try to load when a user is on the WordPress login page.
Cross-posted from edinburghwp.com
Tech: Variable names in WordPress (or why you should never use $category as a variable name)
Make sure your variable names are prefixed or otherwise clearly part of your code. If you use generic variable names like $post and $category and $template you’ll run into conflicts with WordPress global variables.
Cross-posted from edinburghwp.com