Get single category of parent category and display in WordPress post

I can’t remember anything and keep running into things like this so I wanted to post this. I found this on the following forum topic

post meta data: display the child category from one parent only

Basically you just need to update Location to say whatever category you are trying to grab the child cat from.

//get categories for this post and only display if the category parent is Location
$location_cat=get_cat_ID('Location');
$categories=get_the_category();
foreach($categories as $category) {
if ($category->parent == $location_cat) {
echo 'name ) . '" ' . '>' . $category->name.'';
}
}
?>

Quickly Customize the WordPress Login Page Manually

Pretty much this is straight from the codex. However instead of having to read through the page even quickly you can copy and paste this bad boy right into your functions file to get it working quickly. I tried to comment things well so that you can dive right in. If there is a better or cleaner way to do it please hit me up in the comments. Adding the CSS into the hook like that seems a little bit heavy…. ah, looked really quickly at the codex and this is what they had to say about lengthy styles for a custom login page.

From the WordPress Codex:

If you have a lot of login page styles, you may want to make your own custom login style sheet. This code, added to your functions.php file, would load a CSS file named style-login.css, stored with your active Theme files:

function my_login_stylesheet() { ?>

The code that I added to my functions.php file...

function my_login_logo() { ?>

Use has_term() in a basic conditional statement – check for category of custom post type

Seem to always forget how to set up conditionals when working with custom post types. Throwing together a quick post for personal reference down the road. So basically if you have a custom post type with a category this is how you can setup a conditional statement. If you would rather get a great explanation from the codex then you can read that here… http://codex.wordpress.org/Function_Reference/has_term

Here is the code as I used it within my template files…

if (has_term('custom post category name','taxonomy')) {
// do something
} else {
// do something else
}

Yet another new theme for my blog

I have used a pre made theme for the past few months and maybe even a year for my personal blog and am ready for a change. I have been doing a lot of reading for my company about responsive design and some of the various platforms out there that are available as starting points etc. In particular I have always wanted to learn and use something that utilized Twitter bootstrap. Although I don’t know much about it HTML5 Boilerplate is another good resource out there. I found a WordPress press theme that is made from both and can be used as a starting place for a more robust and feature rich theme while using all the goodness that those two base frameworks provide. I am hoping to find a few minutes here or there to experiment with the theme so that I can try and be a little bit more up to date in those areas. I will be probably implementing much of what I learn on day to day basis at muy new company and look forward to doing so. Here is to keeping it fresh and different. Here we go…

Turn Off Comments on Pages

Wordpress Comments Settings for Pages

Quick little tip to turn off comments for both pages in WordPress. This is kind of a two step process pending on whether or not you would like comments to be turned off for all pages or just a single page. For all pages you will want to first visit the following…

Settings >> Discussion >> uncheck “Allow people to post comments on new articles”

If you already are seeing the comments section on a page that you would like to remove it you can either select one or many with bulk edit and under comments select “Do Not Allow” from the comments drop down.

Old School WordPress Widgets Post

Wordpress Widgets Post by Automattic from 2006

Was searching for a plugin that allows you to create and update multiple sidebar widget areas for WordPress and stumbled on an awesome old post from Automattic. It was talking about the implementation of widgets to WordPress for presumably the first time. Looked at the URL and it was touting the year 2006. Just made me feel all warm and fuzzy inside knowing how much WordPress has grown since then. I did not even crack into WP till post 2010 I don’t think. Oh how things grow and catch on. I for one would definitely consider myself a WP fanboy. Not because I really believe that it is the best solution out there, although it might be, but because it is the best solution for me and my abilities and skill sets. Love WordPress and love the accessibility that it provides. Anyway have a look at the post “WordPress Widgets” from back in the day and enjoy!

Wordpress Widgets Post by Automattic from 2006

Change of Theme… already!

Site 5 Wordpress Theme in Action

OK, so I wanted to try and ¬†look at something a little more flashy so I thought I would change up the theme already. However, don’t be deceived into thinking that I don’t want to go down the thematic road a bit more as I move forward with the blog. Might not get to that for a while and may take some time to design, think through the functionality I want, etc. In the meantime I found a batch of pretty cool WordPress themes out of the box. You can see them on Site5’s website here. I am going with one of the nice clean basic feels just to see how it all works. There are some nice basic settings and the feel of the site seems to be pretty clean. This is almost a fopah since I am a designer and work with themes and designs all day. Bottom line is that I want it to look great, learn some more about themes and do a little R&D in the process. So that is why we have the update. Let me know if you like it. Let’s be real, I think only two people know about this blog at this point. Anyway, you can both say what’s up if you like.

Posting via WordPress mobile app

20120205-000216.jpg

Often we have clients that would like to post from their mobile device. Usually we direct them to the very WordPress app that I am using to type this entry up. It supports both horizontal and vertical typing and on the iPhone horizontal is key if you are going to do anything with any speed. Still need to look into options but things seem to be pretty basic. I believe I can attach at least one photo to this post. Not sure about multiples. I believe the exact same app is available for iPad and works very similar if not the exact same. This is a great for a quick post on the run but anything with multiple photos or a lot if formatting is probably out of the question. Harder to review and clear of errors as well. Intentionally am not going to look back through to see how well I did. Here is a screen shot for your viewing pleasure. Oh yeah, don’t forge to set up mobile publishing as well via the WordPress admin.

20120205-000216.jpg

Enter in Thematic

Screen shot 2012-02-07 at 10.53.03 PM

I have been working with WordPress for over 2 years now and have become a huge fan. I think there are a lot of good CMS options out there but for the skills that I carry and my lack of programming knowledge WordPress is a great fit for me personally. I would consider myself a front end designer, therefore the ease in the WordPress structure lends itself to my knowledge of HTML, CSS, JS and PHP of which the later two I have a lower ability in. I have been wanting to dive into various frameworks and base themes for WP development. I landed on Thematic just out of curiousity and popularity of it across the web. I am a huge fan of Automattic, of course. Looking forward to sharing my adventures and anything that I pick up along the way. I am looking forward to shaping a creative child theme for thematic and doing in the cleanest way possible. Also, looking to gain a basic knowledge as we are beginning to utilize Thematic as a base theme for some projects at work.