Auto resize WordPress editor after unhiding it

Oct.15.2014 | 11:50 am

The project I am working on has several templates, some which do not use the main WordPress editor. For those templates, I typically hide the editor via jQuery's .hide() or .slideUp methods.

The problem I ran into was that when editing a page using a template that did not use the editor, then switching the template to one that used the editor, the editor would be broken until the user scrolled, resized the window, etc. This is due to how WordPress 4.0 now resizes the editor window automatically to fit the content in it.

The trick to fix this is to turn the auto resizing off and on again, which fires off all of the auto resize functions. The methods are:

Full post »

Getting a WordPress page by its template

Oct.13.2014 | 01:11 pm

When I create a WordPress theme, I like to make things dynamic, clean and easy for the user(s) of the theme. Today I came across an issue where I needed to be able to link back from a single custom post type to the page that is using the template that displays the listing of the custom post type. The page with the template is currently named 'Portfolio' and it displays all of the 'Galleries', the link will take the visitor back to the 'Portfolio' from a 'Gallery'...exciting!

I could use get_permalink( ID ) to get the permalink by the ID, or get_page_by_path( 'Portfolio' ) to get the page (and then its ID) by its name; but what if the user decides to use a differe...

Full post »

Unstrapping the Boot

Oct.09.2014 | 10:22 am

Coffee is made and knuckles are cracked, I believe it is time for a update to this design. I probably won't change much visually, but a lot of the back end needs to change. This theme was one of my first ventures into responsive design and Bootstrap, and now I know a few more tricks up my sleeve...and some down time.

Full post »

Order columns for custom post types in WordPress

Oct.01.2014 | 12:49 pm

I have been working with custom post types in WordPress for several years now, but never really found a suitable solution for ordering any of the default or custom columns properly. By default WP will order all custom post types by date, which sucks if you want them to sort by menu order, their title, or some other custom column you've created.

Every tutorial I came across (not to say every single one out there is wrong) either didn't work for me, was outdated, etc. So, here's how I just started doing it.


Full post »

Woocommerce notices css classes

Sep.10.2014 | 05:26 pm

These weren't TOO hard to find, however, they weren't as easy as a Google search.

  • woocommerce-error
  • woocommerce-info
  • woocommerce-message

I had two clients this week that wanted me to change the colors for info and message, so I had to make sure I got all of the existing ones. The output actually comes from the three files in woocommerce/templates/notices if you're wanting to modify the output, as well.


Full post »