Author Archive

Paul Smith: The Typewriter Artist

Posted by

Born in 1921 during a time when people with cerebral palsy received little support and garnered little attention from the community, Paul Smith lived a full life painting intricate pictures with what, at the time, was a common office machine – the manual typewriter.

Read More: Paul Smith: The Typewriter Artist

How to Fix Base Page Product Permalink 404 Error

Posted by

I found a solution to a very common issue with WooCommerce permalink structure.

A quick brief of the problem:

In Settings \ Permalinks, if you set:

  • Shop base: products
  • Product category base: products (same as shop base)
  • Product permalink base: Shop base with category, e.g. products/%product_cat%/

When you visit each of the following pages, you got the following result:

  • Shop Base: products works
  • Product category base: products/%product_name% 404 error
  • Product permalink base: products/%product_name% works

That pesky 404 error:

I search for several hours for a fix to this seemingly simple request. However, everything I tried wasn’t working for me. But, alas I found this solution.

The Fix:

What this code does:

This code snippet add url rewrite rule that will override the WordPress rewrite rules for WooCommerce product categories. Long story short, it just works.

Add this code to functions.php and update your permalinks.

Voila, problem solved.

You will now have this permalink structure:

  • Products: products works
  • Product category base: products/%product_cat% works
  • Product permalink base: products/%product_cat%/%product_name% works

Note: If your pages have been indexed using the old structure you should probably add redirects from the old links to the new structure.

Updating Permalinks and Existing Links

1.) Add redirects to .htaccess:

old:  /products/%product_name%/
new: /products/%product_cat%/%product_name%/

2). Perform a Search & Replace to update any hard-coded links to new permalink structure.

Tools to make your life easier:

Better Search and Replace (Plugin)

I would use this plugin for updating most things.

Search and Replace for WordPress Database (Install & Run from Website Root)

Use this if you need to perform search & replace on data that has been serialized. Some sliders such as Slider Revolution and  LayerSlider WP serialize their data, so a basic search & replace would miss these.

Hope this helps someone.

WooCommerce PayPal Advanced Payments Gateway & Stop Spammer Registration Plugin Conflict

Posted by

I recently ran into an issue on one of my client’s sites. Their WooCommerce PayPal Advanced Payments Gateway for WooCommerce (IgniteWoo) all of a sudden wasn’t working correctly. It would process the payment, but the site didn’t record that a payment was completed. They received payment confirmation from PayPal, but not the completed order e-mail generated by WooCommerce.

Furthermore, upon completion of payment information the the embedded iframe that the payment gateway lives in would reload with a notice to confirm my humanity by filling out a CAPTCHA field. After filling out the CAPTCHA the website would reload inside the iFrame resulting in the disruption of information being sent back and forth.

Troubleshooting

  • I tried changing settings with in the plugin interface.
  • Double-checked account information.
  • Went through the setup and made sure all the settings inside https://manager.paypal.com/ were correct.
  • Checked the WordPress forums for an answer and tried several proposed fixes. Discussion can be found here.

As far as I could tell everything was setup as it should be. My last step to remedy this problem was to contact the plugin developer, so I gave IgniteWoo a call. If you have ever called a support line for anything you know that it can be very frustrating and you can be put on hold, be left punching in the numbers that the robot voice told you to, or speak with someone from India or the Philippines; neither of which is ideal.

After a few rings I was pleasantly surprised that an actual human being answered the phone. Not only was it a living, breathing person, but it just happened to be the person who wrote the plugin that I was inquring about. We talked about my problem and went through the plugin settings to make sure it was setup right. We were still stumped. Then the author mentioned that it had to be a conflict with another plugin, because their PayPal Advanced Gateway Plugin did not have any CAPTCHA included with it. He said to find out if any other plugins are utilizing CAPTCHA.

I quickly determined that I had installed the Stop Spammer Registration Plugin a few days earlier.

I disabled the plugin and everything worked as it should. After a several hours of pulling my hair out, I was a bit embarassed that the solution was so simple. This is often the case.

Note to self: Always disable plugins systematically to see if the cause of the error is a conflict with another plugin. I know this, but don’t always do it.

To inform others about the conflict between the IgniteWoo’s WooCommerce PayPal Advanced Payments Gateway and Stop Spammer Registration Plugin, I posted a topic in the WordPress.org forum. You can find the thread here.

Shortly after posting I received a reply from Keith, the author of Stop Spammer Registration Plugin. Keith surmised that gateway callback was breaking some rule and that you would need to find out the IP address range of woo commerce gateway and add it to the whitelist.

I haven’t tested this out, so if anyone has done this I would be interested in hearing if it was successful or not.

Remove Custom Post Type Slug from Permalink

Posted by

There are times that you want to stray from the regular permalink structure that WordPress applies to your custom post types.  For a recent project I was needing to remove the CPT slug from the permalink, so a page url like  “/events/some-event-slug/” would have the permalink of “/some-event-slug/.”  At first glance this doesn’t seem to be that difficult to accomplish, but then you start looking through the WordPress.org forums for a solution and come back with several different “solutions” and none of which work for you. Then there are time you find a script that just works, and that is what I am sharing with you.

Thanks WordPress VIP for posting a solution.

Just paste the following code in your functions.php file and replace “your_post_type” with the slug of the post type you wish to drop the slug from.

When that’s done be sure and update permalinks. That’s it.

See original post here:  http://vip.wordpress.com/documentation/remove-the-slug-from-your-custom-post-type-permalinks/

 

WP E-Commerce Spam Registration

Posted by

One of my clients had an issue where their site was receiving thousands of spam users registering on their site.  This caused his site to be overloaded and was eventually suspended. I initially thought the problem was a spam bot side-stepping captcha, however, that was not the case.

After going through the usual troubleshooting (disabling/enabling plugins one-by-one), I discovered that the issue was only present when WP E-Commerce (version 3.8.13.3) was activated. This issue only surface after updating from (3.8.12.1).

Apparently WP E-Commerce versions greater than 3.8.12.1 had an update in code that somehow causes thousands of fake users to be registered. It looks a lot like spam with user names all beginning with an underscore which looking something like the following  “_aDKCskas.”  It will continue adding customers non stop, ultimately using up resources on the site server.

It was a bit frustrating because the same version on other servers didn’t seem to have this problem. Something the WP E-Commerce shopping cart developers did really jacked things up. If you update WP E-Commerce and notice spam users, reverting to version 3.8.12.1 seems to fix the issue. Previous versions can be found here: http://wordpress.org/plugins/wp-e-commerce/developers/

So I would advise not to update WP E-Commerce anytime soon, unless you have some time to test it and make sure this same issue is not happening to you.

It appears the WP E-Commerce Team is aware of the issue and is working to fix it, but like any issue with major plugins like this everyone wants it resolved yesterday.

For more information have a look at this ongoing forum dialog:
http://wordpress.org/support/topic/spam-users-in-wp_users-after-wpsc-upgrade

Some words of advice:

  • Setup test sites for your clients, so you can catch these issues before they go live.
  • Always have backups of both your files and database.
  • Never update anything without backing everything up first.
  • Always check the changelog to see if the update is major.
  • Be sure and test site out post-update.
  • When everything checks out, then push the change to the the live site.

I think we all know the right way to do things, but sometimes we get busy and cut corners. Most of the time it works out just fine. And then there are those days that things blow up and you are left trying to fix an issue that could have been averted if you would have just done things right the first time.

Note: Some Premium WordPress hosts makes this process much easier.  One that I use often and have been happy with for the most part is WP Engine. They are a little on the pricey side, but it can save you a lot of time in the long run.

Life is much easier with happy clients.

Quick Tip: Opening New Illustrator Files in an Older Version

Posted by

Today I received a logo from a client that was built using the latest version of Illustrator. I am still using CS5 and it didn’t want to open the file.

illustrator-error

Sometimes you don’t have time to track down someone with a new version of Illustrator or to request the file to be saved in another format…especially when something has to be done yesterday. Fear not, there is an easy solution to this predicament.

  1. Take a deep breath
  2. Open Adobe InDesign
  3. Place document in InDesign
  4. Export as PDF
  5. Open in Illustrator
  6. That’s it…enjoy

It would be nice if illustrator could automate this process to be more backward compatible, but then again they need your money!

Hope this helps someone.

Quick Tip: Extracting Images from Word/Pages document

Posted by

I often have clients send me images within Word or Pages documents. This creates an extra step in having to extract all the images. You have to open the document and then save each individual image, or so I thought. Turns out, maybe I’m behind the times, that you can just rename the document with the “.zip” extension and then unpackage it and boom, mission accomplished. You’re welcome.

What is responsive web design?

Posted by

Responsive design is an approach to web development that focuses on tailoring the structure and format of your content so that it is optimal for viewing across multiple platforms.

Plain English: Your website looks just as awesome on a mobile device as it does on your desktop.
 

mobile-only
mobile-browsers
mobile-users

 

Plan with the future in mind

Research indicates that mobile web browsing will surpass desktop internet usage by 2015. Another study points out that 25% of all mobile users rely solely on their handheld device to view the web.

Don’t miss out

Every time someone visits your site on their mobile device, what do they see? Do they have to zoom in and pan to find what they are looking for because the text is so small it’s unintelligible?

Perhaps you have an online store and because your site isn’t optimized for mobile devices they lose interest in your site and leave frustrated missing out on your great products.

The end-users, your customers, want information that is easily accessible and any extra steps that they have to make can be devastating to their overall experience on your site.

Grow your business

Mark Ward Design can help your website look great on any device. Allow me the opportunity to discuss with you what web design solution is right for your business.

Want a mobile friendly website?

Does your current website look less than desirable on mobile devices? Let me help you change that. Fill out this form and I will get in contact with you to discuss the options that are available to you.
  • Tell me a little about your business
  • This field is for validation purposes and should be left unchanged.

Great Podcasts For Web Designers and Creatives

Posted by

When I’m working I like to listen to podcasts. As of recently I’ve stumbled upon some great podcasts about web design. I’ve learned a lot from these guys and I highly recommend subscribing and listening for yourself.

Here is a list of podcasts that I’ve been listening to lately:

shoptalkshow

Shop Talk Show

Chris Coyier & Dave Rupert

An entertaining show about front-end web design. The Rapid Fire shows are probably my favorite, they are a whole show devoted to answering listeners questions. You will not be disappointed.

unmatched-style-bizcraft

BizCraft

Gene Crawford & Carl Smith

A podcast all about the Business of Web Design. Great insight from some industry leaders in the field.

the-businessology-show1

The Businessology Show

Jason Blumer & Dan Mall

Business advice from a seasoned Creative professional and CPA. Interesting mix of business advice from both the accounting and creative worlds.

images

Unfinished Business

Andrew Clarke & Debenham

Haven’t had much time to listen to this podcast (I’ve only listened to one), but I’ve heard good things. Check it out and let me know what you think.

Part 2: How To Transfer WordPress Sites From Plesk To cPanel

Posted by

If you are looking for part 1 click here.

In this post I will discuss how to get the correct permission for your WordPress Install as well as how to setup DNS, both in cPanel and externally.

Step 1: Cleanup unecessary files

If you followed the steps in part 1 you will have your WordPress site copied to the cPanel server. The first thing you will want to do is to cleanup the unnecessary Plesk files that were copied over. Basically anything that isn’t WordPress related. Be sure and double check that your site isn’t using the files before you delete anything, just to be safe.

You can do this through FTP, or through the cPanel file manager. I will be using the file manager because, for me, it is faster.

Go to “List Accounts” and locate the site you just imported in to cPanel. Click the cPanel icon next to the domain.

cPanel - List Accounts

 

Next, open the File Manager.

cPanel File Manager

 

Select the unnecessary files and delete.

cPanel File Manager Edit Screen

 

Plesk by default will have an index.html file in the web root directory, but how Plesk is setup it ignores index.html when an index.php file is present. cPanel does not. So if you’re site is not showing up it is probably due to the presence of an index.html file. There will also be other html files that can be deleted (300.html, 400.html, etc…).

After you have cleaned all the unneeded Plesk files you are now ready to make sure that WordPress file permissions are setup correctly.

Step 2: Fix permissions
When you install or transfer a WordPress site sometimes it doesn’t work as intended. You might not be able to upload media or install or update plugins. There can be any number of reasons why these things happen, I will cover how to troubleshoot these kind of problems in a future post, but for now we will assume it is due to a permissions conflict.

You can research what permissions you should use on a cPanel server and go through your folders and change the permissions manually, or you can just implement a script that will do it all for you. I believe you should always understand what you are doing, but if someone has come up with an easy solution why not use it?

Now the script that I am going to share with you assumes that your server is running suPHP or fastCGI. These require certain permission for WordPress to function properly.

Note: This is somewhat advanced. If you are not comfortable with command line ask your web host or server support to help you run the following script.

This solution comes via: Fix Permissions Script

Connect to your server via SSH.

 
The first line retrieve the script and downloads it to your server. Line 2 calls the script and applies it to an account username. This is the cPanel username, which is visible on the List Accounts page.

Permissions should be fixed. Now you need to test your site.

Step 3: Test site

In order to test the set you will need to edit your computer hosts file to test your site at its new server address (IP)

See this post for instructions on how to edit your hosts file: How to edit hosts file.

Once your hosts file is edited. Look through your site, both frontend and backend and make sure everything is as it should be. After your site passes the inspection you are ready to edit DNS and complete the migration process.

Step 4: Edit DNS
If you host DNS on your server you can edit it through cPanel. Take a look here: Edit DNS Zone

How do I know if where the DNS is hosted? You can use several tools to help answer this questions. Two popular sites are whatsmydns.net and intodns.com. Plug in your url and it will tell you where the NS records are hosted. It is usually hosted on your web server or where you registered your domain from.

If your DNS is hosting elsewhere you will have find the specific steps required by the service you are using.

Here are some popular Domain Name Registrars and how to edit DNS:

Godaddy: Managing DNS for Your Domain Names
Namecheap: How to change DNS servers for a domain
Name.com: Change name servers tutorial

Conclusion

By no means is this conclusive or fool proof. Every server setup is unique and not everything will be configured the same way mine is. Although not exhaustive, these tutorials should give you enough information to get you up and going. If it doesn’t, well just keep googling. There are people out there who always know more.