Hi, I'm Jeremy, a WordPress developer, small business owner, and military veteran.

Anchor Links and Hashed Urls with Genesis Custom Post Class

Here is a simple way to use the Genesis custom post class field to set up a nice little anchor link and hashed url.

Recently I was involved in a project where the about (team) page required a nice smooth scroll that would link an employee’s headshot to an anchored position further down the page where more info about the employee could be found. We also wanted to keep in place a nice human readable hash so that the bio could be linked to directly (for those of you asking why we’re not using the_ID() to accomplish this).

With a few anchor links and a little jQuery this is typically pretty easy to pull off but it gets a little more challenging when you have consider the loop and intend to keep things dynamic.

After exploring Genesis and racking my brain for a bit I came up with a pretty decent solution.


Swapping Sidebars in a Genesis Template

If you do any sort of complex development using the Genesis framework you will likely find yourself requiring additional sidebars outside of the packaged primary and secondary sidebars. Typically I’d recommend using the Genesis Simple Sidebars plugin.

But for some that might seem like overkill when you only require a single additional widget area on a single page template, and for that purpose I’d agree. This is how I handle swapping out sidebars in a Genesis child theme.

Using the Custom Page Labels Plugin for Content Inventories

How many times have you found yourself getting ready to start a big WordPress development project that requires a well-thought-out reorganization if not a complete restructuring of existing site content?

You’ll likely start by taking inventory of what you have, carefully organizing all existing content into topic areas using content type labels or taxonomy.

If you’re anything like me you this is right around the time that you start feeling anxious and overwhelmed, staring at content, trying to figure out where to start.

What if this process could be made easier by starting inside of WordPress?


Charlene WordPress Theme V2 Beta Out

It’s taken forever, much longer than I’d hoped or thought but I finally have something to share in regards to the Charlene WordPress theme.

It’s in beta and it’s up on GitHub. Honest, have a look https://github.com/jeremyjaymes/charlene.

I’ll write a more comprehensive post regarding this version but here’s what I’ll say for now. The theme has been completely reworked from top to bottom, this is not to be considered an upgrade from V1 or older. It is however very similar with most of the same features so the transition should be fairly painless.

Here’s what’s on tap:

  • HTML5 and Responsive
  • Post Formats Included
  • No more theme options
  • A few sensible customization options using the theme customizer
  • New default font
  • Same content focused layout

You can see the demo here http://papertreedesign.com/themes, it will be updated as I push new changes.

Which brings me to my next note. As mentioned above it is available on GitHub and I have enabled support for the GitHub Updater, so if you’re feeling brave and would like to give it a go please feel free but I do not recommend running it on a production site just yet. That said, if you do happen to play around with the theme a bit I would love to get your feedback, you can email me jeremy[at]papertreedesign.com.

That’s all for now.

Update 7/30/2014

I’ve been pushing some pretty steady updates over the past week, we’re getting closer. If anyone out there has taken the leap and activated the theme I’d love to get your feedback.

Update 09/10/2014

Charlene V2 is now considered stable. I’m hoping to have it approved for .org within the next week or two but for now you can grab a copy here and/or see a demo here. All feedback is welcome and appreciated!

WordPress Plugin: Custom Page Labels

Custom Page Labels is a no frills WordPress plugin that allows you to add a custom label (identifier) to a page making it is easier to quickly identify a page on the all pages screen.


Not all page titles are as simple or as identifiable as “About Us” or “Home Page”. More often they’re carefully crafted and even a bit lengthy. For example, about us becomes “Our Amazing Widget Company Employs Only the Best and the Brightest.”


Display Attachment File Type in WordPress Theme

Let’s say we have a list of downloadable items listed on a post or page, case studies for example. To help the end user understand what they will be downloading we’d like to display a file type adjacent to a download link.

e.g. Click to Download | PDF

Background: In this particular example our Case Studies are going to be a custom post type and the file attachments (downloads) are going to be added to each individual custom post type using custom fields. These custom fields are generated using the excellent Custom Metaboxes and Fields for WordPress.

This bit of information is important because by using Custom Metaboxes and Fields we are able to easily retrieve the attachment ID, which is what we really need to make this work. (see this example)

So, keep that in mind, the following can be used as long as you have that attachment ID.

Explanation: The above assumes that we’re in a loop of some sort and have already retrieved our attachment id, e.g. $file_id = get_post_meta( get_the_ID(), '_my_download_id', 1).

Then we use wp_get_attachment_url( $file_id ); to get the url for our attachment. We need this to generate the actual download link but we also want to save it as a variable so that we can use it in the wp_check_filetype( $file_url ) function. wp_check_filetype() returns an array of values containing the extension and mime type.

We then use the $filetype variable to output the extension with $filetype['ext'].

I might expand on this a bit more in the future to explain in detail how this was used but there should be enough there to be potentially useful.