This is my repository of code snippets, url links, and other stuff  that I use to develop website with.  The main purpose of this site is to catalog, and easy search for the stuff that I use on a regular basis.

Working With Taxonomy’s

January 21, 2015

I recently needed to work with a taxonomy that was created for a custom post type, where I needed to access the parent taxonomy.  I came across this same code in the wordpress support forums.  It should be useful when working with taxonomy’s in the future. reference: https://wordpress.org/support/topic/if-current-taxonomy-has-child-andor-parent

Unorder List Navigation with Separator

November 18, 2014

Occasional I need to add a top navigation list or navigation list in the footer, and want to add a separator like the pipe symbol to make it obvious the separation of titles for each of the links. A simple solution to this is adding some css to automatically append them for you. reference: http://stackoverflow.com/questions/9171699/add-a-pipe-separator-after-items-in-an-unordered-list-unless-that-item-is-the-la

Character Encoding Problems with Content

November 13, 2014

I recently worked on a large wordpress blog site that had character encoding problems with the content.  It’s not that big a deal to fix one or two instances where you see funny looking characters displayed on the page, but when you have hundreds of them, it’s time to turn to mysql queries to fix […]

Disable Large Breakpoint in Bootstrap 3 for LESS

November 2, 2014

Removing the large desktop layout in less can be achieved by commenting out a few lines in the grid.less file.  Comment out these two sections in the grid.less file, and the medium grid will become the largest size for your site layout. reference: http://milos.gavrilovic.rs/how-to-disable-certain-breakpoints-in-bootstrap-3/

Using mysqldump to Backup a Database

March 24, 2014

Occasionally I have new clients that don’t have access to their control panel, so that a dump of the database cannot easily be performed from a nice GUI interface (Very useful when I want to setup their site for local development). If the server allows executing mysqldump from in php, the following code can be […]

Useful Regular Expression

March 14, 2014

This is a collection of useful regular expressions that I’ve found useful in doing some powerful manipulation of text, or extracting specific data. source source source

Keep it Secure – Enforce All Pages Over SSL

January 16, 2014

Recently I had a project that the client was using to collect user registration information, and we wanted to make sure that the information provided was done securely over SSL.  Rather than try to enforce this in the code, a simple change in the .htaccess file makes this easier to enforce.

Keep the Subscribes Off the Backend

January 14, 2014

Another quick function to help with member / subscribers sites that will keep them from even getting to the wordpress admin dashboard after logging in. I’ve modified this from the original version to check if the user used the /wp-admin/ in the url, so that you will still be able to redirect to the login […]

Hide Admin Bar For Non-Admin Users

January 14, 2014

I recently had a site where the client wanted to have the resellers register for access to specific pages, but we didn’t want those users to see the admin bar displayed on the front end of the site once they logged in using wordpress user accounts.  The following code will disable that admin bar for […]

Remove Those Extra Line Returns in Files

January 14, 2014

Occasionally when I download files for site that I work on, text files have extra returns after every line of text.  It’s annoying, and makes it much harder to work with code like this.  I recently came  across this regular expression to remove these in Dreamweaver, but it will work as well in TextWranger (or […]

Scroll to Top