Archive for February, 2014

Get the ID of a Post Meta Image

I Google’d and checked the WordPress codex, but could not find a function that would give me the ID of an image I uploaded into a custom meta field.

The Problem

I have uploaded an image, but that image is huge. I want to be able to display the image at my predefined size. There are functions to display the post thumbnail (featured image) in any which way you want, but this is different.

This is the cleanest method I’ve found to get the attachment’s ID. With the ID, you’ll be able to use a function to display that image.
Read the rest of this entry »

Responsive Fixed-Fluid Layout

The Problem

Build a two-column responsive page that had a fixed-width right column. It actually sounds easier than you think. That fixed-width right column throws a wrench into everything.

For this example, let’s go with a fluid left column and a 320px wide right column.

HTML

<div class="main">
<div class="leftwrapper">
<div class="left">

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent elit dolor, congue vitae turpis in, blandit dictum magna. Praesent sollicitudin dictum libero. Aliquam tempor elit quis metus egestas, vel adipiscing nibh pulvinar. Aenean quis venenatis massa, at interdum est. Praesent iaculis mi lacus, quis auctor purus placerat vel. Cras sed commodo velit. Aenean ac aliquam purus, vitae rhoncus justo. Proin mollis facilisis sapien, id consequat purus imperdiet eu. Donec posuere, arcu a facilisis ultrices, nibh nisi convallis ante, et sollicitudin metus ante vel felis. Curabitur sagittis, dolor malesuada adipiscing pulvinar, velit risus elementum augue, non tempor lectus mi sit amet ipsum. Aliquam mollis semper ultrices. Sed eleifend tempus dui nec venenatis. Maecenas faucibus turpis leo, nec facilisis sapien mattis non. Donec in elit vitae enim interdum auctor nec id dui. Vivamus sed odio diam. Cras pretium dolor ac neque iaculis eleifend.

</div>
</div>
<div class="right">

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Praesent elit dolor, congue vitae turpis in, blandit dictum magna. Praesent sollicitudin dictum libero. Aliquam tempor elit quis metus egestas, vel adipiscing nibh pulvinar. Aenean quis venenatis massa, at interdum est. Praesent iaculis mi lacus, quis auctor purus placerat vel. Cras sed commodo velit. Aenean ac aliquam purus, vitae rhoncus justo.

</div>
</div>

Read the rest of this entry »

So Childish

“I’ll be right by your side ’til 3005, hold up”

Grilling Tri Tip

Grilling a tri tip can be intimidating. It’s varies in thickness so it can be undercooked easily. YOU NEED TO INVEST IN A MEAT THERMOMETER! Seriously, one of the best cooking investments ever.

I found this video and pretty much followed his steps and each time has been amazing.

Pork Chops, the Cast Iron Skillet Way

I’m still new to the whole cast iron skillet thing. I like how versatile it is. This isn’t much of a recipe more than a procedure.

Ingredients

  • 2-4 Pork Chops, bone or no bone, roughly 1-inch thick
  • Olive Oil
  • Salt & Pepper

Read the rest of this entry »