Categories
Development

Display WordPress Child Pages as a List of Links

After figuring this one out, it’s really easy to do but I did have a hard time since I didn’t bother to check and see if a specific function already existed to do this behavior.

I wanted to display all the child pages of a Page as an unordered list. I initially tried using the WP_Query function to make this work. I tried creating a loop and feeding it some parameters, but kept getting no results.

Upon some further searching I did come across the wp_list_pages() function. I’m not sure why I didn’t begin with this, but for some reason I was set on using WP_Query.

There’s a ton of parameters and some great examples found on the wp_list_pages() page.

Here’s the little bit of code I added to a template to output the child pages as a list. Notice that the parent page’s id is the 32 that you will see as a parameter below. Enter whatever your parent page’s id is in it’s place.

wp_list_pages('sort_column=menu_order&title_li=&child_of=32');

Doesn’t really get much easier that that.

Categories
Books

Blink: The Power of Thinking Without Thinking

BlinkFigured I’d give something different a shot at the library, so I checked out Blink. It is pretty much about the first 2 seconds of making a decision. It was pretty interesting stuff.

There’s a ton of real world examples and how split second decisions are usually as good and many times better than a well researched decision. The whole simulated battle with the side with all the additional information losing to the less informed one was really interesting. More information means more time to process, and many decisions just don’t have that much time available.

I kept thinking to work where I see areas that need to form a committee to form a committee to evaluate everything, etc. I see it all the time, and usually the result is no decision seems to be made. Perhaps I should recommend this book to some people I know ;-)

Working on the web, and constantly analyzing a users behavior really has a lot of similarities with the Blink theory. It was weird, I felt as though I had read this book before since so much of it has been applied to when I develop things for the web.

Interesting read.

Categories
Books

The Last Boy: Mickey Mantle and the End of America’s Childhood

The Last BoyI figured I’d visit the non-fiction area downstairs in my local library for my next book to read. I happened to stumble over the biographies, and began to scan for someone who might be interesting to me. Being a Yankees fan, and hearing so many different stories about Mickey Mantle over the years I figured I’d give this one a shot.

Though I’ve heard it many times, I must say that after reading this I’m still amazed at how much of a jerk Mantle was through most of his life. The way he treated women, fans, kids, etc. it’s really shocking at times. Granted, just because you can crush a baseball and are idolized doesn’t require you to be perfect, but he just did some very trashy stuff.

It’s very sad to hear of his and his families unfortunate luck throughout life. With the exception of his amazing athletic ability, they really weren’t dealt good health. Unfortunate short lfes seemed to be the Mantle norm.

While the book does cover much of the scummier side of Mantle through the years, it does also do a good job of pointing out what a great teammate he was. He really did give that organization his all (well when he wasn’t showing up to games drunk that is).

This was a very interesting book. However if you grew up idolizing Mantle you might want to consider if you want your childhood hero’s image to be tarnished or not.

Categories
Development

Trashing a Draft on the Server with Adobe Contribute

I was dealing with a very bizarre draft issue with Adobe Contribute CS5, that we finally solved after much head scratching.

A Draft was showing up for only 1 user that a Draft that she had sent to me to publish was still being reviewed by me. This wasn’t the case, however no matter how many times we tried to remove the .LCK file or edit the page again etc. it was still telling her that I was still reviewing it. So she could no longer edit that page, yet any other user could.

We deleted traces of the draft on the server then her local machine. However, her Contribute would recreate the draft status. So after much work, we finally went to her Draft Console and right mouse clicked on the Draft and viewed properties.

Up opened a wonderful little video stating the drafts filename (it’s a pretty crazy random string) as well as the URL path to where this phantom Draft existed on the server.

Once we had this path, we were able to delete the remnants of this Draft from the server and all is well again. Damn you Contribute, damn you to hell.

Categories
Development

Theme Fields in Drupal 7

This is so easy now that I know how to do it, but I didn’t realize that fields could be themed similar to nodes.

Just create a template file titled:

field–[field_name].tpl.php

Drupal 7 Content types

and save it in your theme’s directory:

/sites/all/themes/[your_theme]/

You can get the field name on the Content Type screen, Structure > Content types > [your_content_type]

Then you just enter your markup in the field–[field_name].tpl.php file that you’ve created.

You can use the field.tpl.php file located in /modules/field/theme/field.tpl.php as a starting point.

 

Categories
Uncategorized

My Triple AAA Approach to Social Media Customer Service

AAA Emblem
I assist at work with handling our social media presences. Of which we do get the occasional upset and or nasty comment. Today I do believe I just coined the Triple AAA Approach to handling negative social media postings.

So here are my 3 steps:

  1. Acknowledge – this that you the person’s comment has been heard. This is very important and the sooner it can be done the better! Simply acknowledging the problem/complaint can on it’s own solve many problems.
  2. Apologize – I don’t care how right you may feel you or your organization is, apologize for what occurred. Again, this can and should be done in a very timely manner. Often somebody just want’s to hear an apology and isn’t necessarily looking for a resolution.
  3. Answer/Assist – this is the last step. Get them help or answer what their problem or issue was. Sometimes this can take time, and in that case the first two steps can be taken in the meantime to hold them over and let them know that you are actively working to assist them.
That’s it for my Triple AAA Approach to social media customer service.