Fix StanleyWP Theme Portfolio Grid

wp-stanley

Fix display of portfolio grid rows

Back in September of 2014 I wrote about using the StanleyWP WordPress theme for a portfolio site. After I added some projects, I noticed the grid on the Portfolio page template wasn’t displaying rows correctly. I even noted it in my original post, towards the end.

I’ve had a few people contact me about how to fix the StanleyWP portfolio grid issue, and earlier today Arun left a comment asking how to fix the grid issue.

You need to be using a child theme for this, it’s just good practice. If you don’t know how to create a child theme, read my post on creating a child theme. It’s really easy to do, but may require you to reset your menu or some widgets after changing to the child theme.

Anyway, Arun confirmed that this gist fixed the problem for him:

Just save that code as template-portfolio.php and put it in your child theme directory. Your portfolio should now show three projects per row. No CSS or anything else needs to be modified, just that one page template.

Let me know if you have any issues or questions.

Passwds.io Source Available on GitHub

passwds-github

Now on GitHub

Took a bit longer than I wanted, but the source for passwds.io is up on GitHub now.

It’s extremely simple, using Twitter Bootstrap, straight PHP, jQuery, and the jQuery prettySocial plugin for the social buttons at the bottom of the site.

Passwords are generated using pwgen-php from Superwayne. pwgen-php was forked a couple years ago by Roderik van der Veer, which I was unaware of.

I’ll be updating to the somewhat newer pwgen-php library from Roderik at some point.

Basically, an AJAX request is sent to a PHP file, grabbing the requested passwords, and then the results are displayed.

Pretty simple. Let me know if you have suggestions or questions. Please be kind, I threw this together in about an hour one evening.

Add Schema.org Markup to WooCommerce Products

woocommerce-schema-post

WooCommerce & Schema.org Is Awesome

Adding schema.org markup to a well coded WordPress theme is relatively straight forward and doesn’t take very long to get setup.

I covered how to add schema.org markup to your WordPress theme in a previous post, but I recently needed to apply schema.org markup to an e-commerce site using WooCommerce.

It’s surprisingly easy to do. You’ll need to be using a child theme for the steps that follow.

1. Setup the necessary function in the functions.php file for your theme

Add the following to your functions.php file. It creates a custom function, schema_org_markup.

2. Call schema_org_markup() In Your Header

Open up the header.php file for your child theme and find the html tag, usually towards the top. You’ll want to call the schema_org_markup function inside that html tag, like so:

3. Create a WooCommerce template file in your child theme

Create a directory in your child theme folder named woocommerce. Inside the woocommerce folder, create another new folder named single-product. Inside the single-product folder, create a file named price.php. The contents of your price.php file should look like this:

4. All Done

That’s all that’s required to add schema.org markup to individual WooCommerce product pages. Pretty simple.

If you run into any issues or it doesn’t seem to be working for you, let me know. I’ve only tested this with two themes, Vantage and Virtue. Remember, this only works with well-crafted WordPress themes. Doing this with purchased themes from ThemeForest or other paid theme marketplaces can be significantly more difficult.

Comments are open so let me know if you have any issues, additions, questions, or suggestions.

Introducing Passwds.io

passwdsio

Pronounceable Password Generator

I’d had this code sitting around for a while and decided to make a new site dedicated to it. It’s called passwds.io. It’s a simple service that produces pseudo-random passwords that have some elements that can actually be pronounced, hopefully making them easier to remember.

I do not recall where I got the original code to generate the pronounceable passwords, but am trying to find the source so I can credit where it’s deserved.

I threw thew site at passwds.io together in about an hour using the newest Bootstrap, PHP, and jQuery.

Brandon Lighter brought up the fact that I could be storing all generated passwords, but I’m not. This was developed as a tool for myself to use while I was a sys admin at a large local business, I’d use it to create new passwords for users in Active Directory. It’s still the same code.

Once I can bring the code to a level that isn’t so scattered, I will put it on GitHub so everyone can see the source and what’s going on. It’s really very, very simple.

Of course, I could omit the important “logging” piece when pushing to GitHub, but at some point people just have to trust others, and I’m flat out saying there’s no type of logging being done at passwds.io, other than the standard Google Analytics and Gaug.es for site analytics/

Brandon does bring up good points though, like no usage of special characters.

Secondly, they are only lower-case, upper-case, and numbers, which means you are pulling from a much smaller character set than you could be, making brute-force attacks easier.

I may add an option to do pronounceable passwords, or passwords with special characters enabled, which would probably break pronounceability. But options are always nice.

If you have other suggestions, I’d love to hear them. I’ve debated adding user accounts and the ability to save your generated passwords (that would be accessible only by you), but that sort of goes beyond the scope of passwds.io, which is simple, fast password password creation.

An example output from passwds.io can be seen in the screenshot below.
passwdsio-results

Also, check out Placezombie.com if you’re looking for some pretty gruesome zombie images to use as placeholder images in your designs. Sample 900×150 pixel greyscale image below, achieved with https://placezombie.com/g/900x150 :

Anyway, like I said, I’d love to hear your thoughts on passwds.io. Leave a comment here, it’s the best way to communicate with me about passwds.io. I haven’t bothered setting up passwds.io email yet.

Placezombie: The Zombie Image Placeholder Service

placezombie

Zombie Placeholder Images Are Back

And just in time for Halloween!

I wrote a post about my 10 favorite image placeholder services a while ago. Placezombies.com was one of them. Here’s the announcement blog post for Placezombies.com.

Down in the comments, you’ll see that the owners forgot to renew the domain name, so it obviously stopped working. The source was posted on GitHub, so I immediately forked it and got to work setting up a replacement.

A quick check revealed that placezombie.com was available, so I registered it. Score.

I really didn’t want to host this at DigitalOcean like I typically would, not knowing what to expect for bandwidth usage. Instead, I chose to host it at Heroku, using their free service.

Had a few issues getting it running, but after removing some Ruby stuff and creating the Procfile and package.json files that Heroku requires, I was almost good to go. Only thing holding me back was to replace the port number node.js was using with the port that Heroku uses. Did another git push heroku master, navigated to http://placezombie.com and there it was!

Here’s a 700×300 zombie below for proof!

Placezombie.com

That was generated like so:

You can do black and white images, too:
Placezombie.com

That was generated like so:

So, add some gore to your mock-ups, just make sure your clients aren’t too squeamish.
Placezombie.com

My 5 year old daughter is obsessed with Zombies and is going to fucking love this. She wants to be a Zombie Elsa (from the movie Frozen) for Halloween. :)