In my last post, I wrote about the benefits of using YOURLS, a self-hosted link-shortening service. I’m finding that YOURLS is great, but it’s not perfect. Some of the issues I have experience are part of what you get using most URL shortener services.
Some of the downsides of using link shorteners are:
- Google Analytics doesn’t always capture the original referrer (and I have no clue how they do the rest of the time!).
- When generating links using the bookmarklet (or in this case, also the Yourls installation), there’s no easy way to add campaign, source, medium, content, and term tags for Google Analytics to track.
- Yourls doesn’t allow query strings on URLs by default, making overriding existing campaign tags difficult/impossible. For example: `http://katz.si/t?utm_source=2300`
I’m not the only one who wanted these things, so I’ve created a plugin that adds Google Analytics tracking to Yourls. It’s very cool.
Continue reading “Yourls Google Analytics Link Tagging”
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. In creating new WordPress plugins (see a list of my plugins), I have improved how I code: writing more efficient code using WordPress functionality rather than hacks.
One of the methods of coding that I have discovered (thanks to Jeremy Clarke) is using the WP Cache and Transient APIs to store plugin data. It’s made a big difference in the speed of all my plugins.
The following is a quick review of three different ways of storing data when you code plugins or work with WordPress. This is to the best of my knowledge, and I welcome feedback/improvements in the comments. Continue reading “Storing Data in WordPress Plugins – A Quick Rundown”
Another WordPress SEO Plugin by Katz Web Services
The Show Content Only Plugin enables you to show only a post or page’s content, without sidebars, footers, and other content.
There are many different reasons for wanting to show just the content, but there’s never been such an easy way to do it. This plugin adds a box in the post and page editor that provides you with four links:
- Content Only
- Content with Tags
- Content with Categories
- Content with Categories & Tags
This is very helpful in conjunction with the Google Keyword Tool, so that Google only analyses the content of your post or page, not the surrounding context as well.
Click the links below to see this article in the variations available.
Leave your requests, feedback, and any bugs in the comments below.
If you want to disable the WordPress plugin WP-DownloadManager‘s
download-css.css file from being loaded, add the following code to your
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.
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 also wanted to have the testimonials as a category in WP, rather than as a separate plugin. This code will work for any type of category, not just a testimonial.
Here’s how to create a random post item in your sidebar: Continue reading “How to Display a Random Testimonial or Post in WordPress”