Added in the functionality that was hard coded into my theme.