This code adds a custom body class when the permalink contains the slug test-slug. If it doesn’t, no custom body class is added. Could also be written like this : [code] add_filter( ‘bo…
After my post on Renaming the default “Posts” post type in WordPress to something else, I’ve gotten some follow up questions on renaming taxonomies as well. Here is a quick tutorial on how you can rename the default WordPress taxonomies (tags/categories). Solution Similar to renaming the post type, we need to tackle two areas: the …
Galleries and images are not new to WordPress. Gallery plugins existed long before WordPress had enhanced media functionality of it’s own. The [ gallery ] shortcode was introduced in version 2.5 and the Gallery Post Format came around in 3.1. This post will walk you through the process of working with and styling the native […]
Taking Over a WordPress Website: The Ultimate Checklist
As simple as WordPress is to get up and running, taking over a WordPress website from someone else is anything but. It’s not hard to take control of a WP install, but there are a lot of moving...
Image Carousel Thumbnail Slider with ACF Gallery Field in WordPress | WP Beaches
Here is a guide on how to make an image carousel thumbnail slider with ACF in WordPress using the ACF gallery field. Lightslider, a lightweight image slider seems to fit the bill perfectly – I need it to just display simple thumbnails below the main image which on click/touch show the image in the main slide…
How to Edit an Image in WordPress: Crop, Scale, Rotate, Flip, Resize
Learn how to edit an image in WordPress. Scale, rotate, flip, resize & crop images in the WordPress Media Library. This step-by-step guide demonstrates how to easily edit WordPress images with no photo editing software, Photoshop, etc. Restore your original image with one click, or replace an image and keep the file name.
How To Make A Dynamic Website Become Static Through A Content CDN
What if we could have a WordPress website in which its dynamic content could be exported as static files? Leonardo Losoviz explains how you can combine both worlds: switch to a static site generator without having to abandon WordPress.
Powering the WordPress Search with React and REST API - Igor Benić
The WordPress Search Widget is a classic HTML Form, but what if we want to show the results right away? In this tutorial, we will power up the WordPress Search Form with React and REST API to show the results […]
Be Watchful: PHP And WordPress Functions That Can Make Your Site Insecure
Before deploying a new plugin in WordPress, it's a good idea to keep a list of easy-to-misuse functions by your side. Let's take a closer look at some functions which you can and should use as part of a broader security strategy.
Designing a system: WordPress REST API endpoints | The Man in the Arena
Let’s talk about the WordPress REST API. It’s been around for a little while now, and you might have even started using it in your projects. After all, a lot of us are trying to get more into…
In this short tutorial, we look at the WordPress body class and how we can manipulate it using core API calls.Specifically, we cover adding body classes, removing body classes, conditionally adding...
Add a body class based on the value of a custom field / post meta
This morning I needed to add a body class to a page only if a meta value stored in the posts meta data was a certain value. Here are a couple examples of that in action.
WordPress Snippet: Redirect to single search result | NibbleGuru
A lot of times when people visit my blog and search for something, I see that most queries only return a single search result. How [Continue reading...]
Don’t use template_redirect to load an alternative template file
template_redirect is a popular WordPress hook, for good reason. When it runs, WordPress has made its main query. All objects have been instantiated, but no output has been sent to the browser. It i…
One of the most frequently asked question on the ACF support forum is how to use a WP_ Query to search for posts based on the values in repeater fields. I’m going to give you the answer, and it is a really simple one. You Don’t! You will find several discussions and filters on the […]
How to use a custom post type archive as front page?
I'd like to use a custom post type archive as a site's front page, so that http://the_site.com/ is a custom post type archive displayed according to my archive-{post-type}.php file. Ideally I ...
Managing a WordPress site is tough work, and it’s made even more difficult when encountering frustrations on the backend. And the reason why is simple: The more your site grows, the more cluttered it can become. But never fear. We’re
Wordpress: Allow Editors to Manage Menus - Articles - The Web Taylor
By default users with the role of editor cannot see the "Appearance" menu and are not able to access any sub pages, including the menu editor. If you want
A Deep Dive Into WordPress User Roles and Capabilities
A deep dive into the concepts of WordPress user roles and capabilities from both developer's and user's perspectives. Check out these concrete examples.
This guide will demonstrate how add custom fields to a Taxonomy Term and then modify the term’s template file HTML. Terms can be items such as WordPress ca
setup_postdata(): The Template Tags You Need, the Custom WP_Post Arrays You Crave | WPShout
setup_postdata() lets you treat any bundle of posts the way you would normally treat the results of a WP_Query. setup_postdata() is a function I really lov