Categories
Code Gravity Forms

Is Gravity Forms not able to repair your `gf_addon_feed` database table?

If you click the “Re-run database upgrade” link in Gravity Forms’ System Status page, and it doesn’t properly generate the {prefix}_gf_addon_feed table, here’s the likely problem: The Feed Addon that you have installed is likely not being activated early enough. This is about to get techy: The “Re-run database upgrade” script is triggered by the […]

Categories
Code Web Development

Allow customers to update their cards in disabled gateways using Easy Digital Downloads Recurring Payments

Last year, GravityView was using PayPal Pro to process credit card transations with our shopping cart, Easy Digital Downloads. Over time, we became frustrated with the error rate of PayPal notifications: PayPal kept telling us the country code wasn’t set. But it was. This was preventing customers from checking out, so GravityView switched to using […]

Categories
Code WordPress

How to fix UTF-8 filename issues when using wp_handle_upload()

PHP said the file didn’t exist. Except it did. file_exists() wasn’t working for a file uploaded using wp_handle_upload(). It worked for every other file, except for one provided by a German customer. I confirmed the following: The file did exist in the correct wp-uploads sub-directory The file had correct permissions The directory and its parents […]

Categories
Code jQuery WordPress

Fixing JSON Parse Error in WordPress Plugins

If you write WordPress plugins and make AJAX requests, you may be familiar the dreaded Javascript error: SyntaxError: JSON Parse Error: Unrecognized token ‘>’ Why? Why!?! What it means is that the response your code expected is screwed up because a plugin barfed PHP warnings into the admin-ajax.php ventilation system. When WP_DEBUG is on, admin-ajax.php […]

Categories
Code CSS WordPress

How to use your own widget icon in the WordPress Widget customizer

In developing deeper integration with the Customizer functionality of WordPress, I wanted to use a custom icon for my IDX+ plugin’s widgets. By default, WordPress defines a list of icons using their dashicons icon set and tries to guess the best icon for your widget based on the CSS class of your widget. Check out […]

Categories
Code

How to remove WangGuard honeypot fields

WangGuard is a great plugin for blocking spam registrations. Without it, this site gets about 50 per day. No good! I did encounter an issue, however: The <![if !IE]> tag was showing on my registration form for some reason. The code WangGuard adds inside the tag is used to generate a “honeypot” section: spam bots […]

Categories
Code WordPress

Test Payments for Admins in Easy Digital Downloads

I’m in the process of setting up a store using the Easy Digital Downloads plugin. It’s been a good process so far and I’ll have more posts about it. While I was setting up the checkout process for testing, I wanted to be able to use test payments but keep the option hidden to non-admin […]

Categories
Code

Prevent Refresh from Adding Another Product in WooCommerce

Prevent items from being mistakenly added to the cart multiple times. Mountain America Jerky uses the WooCommerce eCommerce plugin for WordPress, and they were having an issue: when users added a product to their cart then refreshed, the item was being added again. Also, when customers added items to their cart, then hit back, they got the dreaded […]

Categories
Code WordPress

Paginate Links in WordPress Link Manager

Links are not first-class citizens in WordPress In developing the a website for professional genealogists, I was tasked with creating link directory functionality in WordPress. I didn’t want to install some big plugins; I wanted to use the Links Manager that’s built in to every WP install out of the box. There were two problems, however: Link […]

Categories
Code WordPress

Storing Data in WordPress Plugins – A Quick Rundown

Coding better WordPress plugins As I’ve worked with WordPress plugins, I’ve learned new ways of working with WordPress. WordPress has tons of built-in functionality that is very useful and easy to use once discovered. I am by no means a great PHP coder. I am still learning OOP principles and how to write code better. […]

Categories
Code WordPress

Auto-Optimize WordPress Database without a Plugin

These horses are somehow not cool. Speeding up your blog is. I am working on a WordPress project that has a pretty heavy database, and I want to be able to auto-optimize the WordPress database. Even though they are integrating this functionality into WordPress 3.0, I want it now, and without having to use a […]

Categories
Code QuickTip WordPress

How to Prevent Loading WP-DownloadManager's CSS File

If you want to disable the WordPress plugin WP-DownloadManager‘s download-css.css file from being loaded, add the following code to your functions.php file: remove_action(‘wp_print_styles’, ‘downloads_stylesheets’); Alternatively, if you would just like to use your own stylesheet, you can add a file named download-css.css to your theme’s directory, and the plugin will automatically load your stylesheet instead.

Categories
Code Shopp

Add a Store Catalog XML Sitemap to the Shopp Plugin

The Shopp default RSS/XML/Google Base solution was not enough. I needed to have a Google Base feed that featured all the store products. For some reason, the recommended process wasn’t working for me. It was either showing only recent products, or it wasn’t working at all.  Here’s how I fixed it:

Categories
Code WordPress

Simple Taxonomies Formatting — Improve the Plugin's Code Output

I’ve been using Joost de Valk’s Simple Taxonomies plugin for a couple of projects, and I’ve been very disappointed by the formatting of the terms output code. When configuring the plugin, you have the option of choosing “Add terms to the end of posts” or “Add terms to the end of excerpts.” If you do, […]

Categories
Code

How to Display a Random Testimonial or Post in WordPress

Set up a testimonials category — no need for a plugin. There are a couple of plugins designed specifically for testimonials, but I didn’t want to use them; they use their own databases, and don’t keep with WordPress’ simplicity. If possible, the best way to work with WordPress is to use it’s built-in functionality. I […]

Categories
Code WordPress

Get Adjacent Images – More WordPress Functions

WordPress, just get the adjacent image links. I’ll tell you what to do with them! WordPress is normally great about providing functions that have a return and an echo version.  In WordPress, if a function has the prefix get_, then it does not echo (print it into the content), but rather returns the result so […]

Categories
Code WordPress

WordPress Digg Shortcode Function – As Seen on WordPress.com

When moving from WordPress.com, my Digg shortcodes broke. I wanted a simple way to transition my Digg chicklets to a WordPress.org installation. I created a function that does nothing special, except for reproducing the Digg shortcode functionality on WordPress.com. All you need to do is enter [digg=http://digg.com/path_to_story_on_digg], and it will create a Digg This chicklet […]

Categories
Code Web Design Portfolio

Mountain America Jerky Redesign Launched

Mountain America Jerky Redesign I’m happy to announce that today the new Mountain America Jerky website launched. Check out the site and try some of their crazy-good Garlic Black Pepper Beef Jerky. One perk of working with a nice client who sells beef jerky is getting samples of the product! Seriously, though, it’s the best […]

Categories
Code SEO WordPress

SEO Randomizer: Save the Value of Your SEO'd Links

Update: Now use the SEO WordSpinner plugin to implement this concept.Use the get_seo_spin() PHP function in your theme’s footer.php file. Footer links are dropping in SEO value How to stay relevant while getting great links As a web designer and SEO, I place links in the footers of most of my designs. Clients don’t mind […]

Categories
Code SEO WordPress

Nofollow SEO for your WordPress Functions

While working on a recent website, I became frustrated by the lack of nofollow support in many WordPress functions.  Make that, most WordPress functions. There are a few WP functions that I wanted to add nofollow to, so here’s a list and a download link: