Here’s something I noticed when trying to redirect a PDF URL to a new URL. On most servers, using .htaccess redirects, or even redirect plugins, have no effect, because most servers are configured to resolve directly to the PDF URL. Here’s how you can fix that on Apache servers.
How To 301 Redirect a PDF in WordPress for SEO
Add CSS Class To Single Post Based on Category In WordPress
Here’s how to add a CSS class to the body tag of a single post or post type, based on the post category, in WordPress. Why would you want to do this? Maybe you want to add custom CSS styles to single posts in specific categories, but you don’t want to create a custom template […]
Get the URL of a Featured Image in WordPress
Sometimes it is useful to get the URL of a Featured Image in WordPress, instead of just outputting the image itself as HTML. When would you use this? If you need to get the URL in order to use it for a background image, as in a header at the top of the page, for […]
Integrating Google AMP and WordPress
In October of 2015, Google debuted a new project called AMP, or Accelerated Mobile Pages. The project is open-source, with other companies like Adobe, Twitter, Vox Media, BBC, The Guardian, and The New York Times also contributing to this project. So what is AMP? And why does it exist? For the last few years, web […]
Add Advanced Custom Field To RSS Feed In WordPress
One way to move people from being prospects to being customers is to educate them through content marketing. This usually takes the form of blogging, podcasting, videos, or some other form of serialized content, published on your company blog. Many companies use their email newsletter as a way to send their RSS feed directly to […]
Change Proceed To PayPal Checkout Text in WooCommerce
A reader asked how to change the Proceed To Paypal button text on the WooCommerce Checkout page. I figured there would be a filter for this, because it’s WooCommerce. but because it’s a payment gateway, there’s no built in hook for this button, like there is for the Place Order button text. What I found […]
Add Manual Exceprts to Pages in WordPress
Excerpts in WordPress are sometimes used as preview text on an archive page (like a blog or category page). WordPress themes usually enable excerpts on Posts by default. If you are editing a post, and don’t see the field for Excerpt, it is probably hidden under the Screen Options tab in the top right corner. […]
Add an Options Page with ACF (Advanced Custom Fields)
Over the course of the last eight years, I’ve built over 150 sites, most using WordPress. This code snippet is something I’ve used with ACF PRO aka Advanced Custom Fields PRO in order to set up an Options Page. The data from this newly created Options Page would be saved in the wp_options database table. […]
Add New Fields To WordPress User Profiles
On your WordPress user profile, in the back end of the site, you’ll notice most themes have places to input your website, Facebook, Twitter, and YouTube URLs. Many years ago, you had to add these manually, and WordPress (back in the day) used to have places to set your AIM (remember that?), Jabber, and Yim […]
Add Edit Profile Link In bbPress
bbPress is a popular WordPress plugin for creating forums. Sometimes, it is used by itself, but often, it is used in conjunction with BuddyPress, another WordPress plugin for creating self-hosted social networks. As it turns out, many folks have sought out how to add a link to edit your profile on bbPress, outside of the […]