Adding hAtom structured data to the WordPress Hueman theme

I literally crapped my pants the first time I saw 800+ hAtom errors, when testing my site out with Google Webmaster Tools. It’s a little amazing why something like this isn’t baked into WordPress themes by default. Nevertheless, we all know how rapidly trends like these shift.

Less whinging, let’s get to work! I’ll just share my fixes on this problem.

Note: This fix is largely specific to the WordPress Hueman theme, a really fantastic theme if I might say so.

Errors encountered when testing structured data

When using the Google Webmaster Tools Structured Data testing tool, you get these errors.

Error: At least one field must be set for HatomEntry.

Error: Missing required field “entry-title”.
Error: Missing required field “updated”.
Error: Missing required hCard “author”.

Creating a child theme

  1. Best to apply this fix in a Hueman child theme (download sample), rather than editing the actual theme files. No fear of losing modified source code on theme updates!
  2. Unzip the .zip file into a folder. Place that folder on the same level as your original Hueman theme, under wp-content/themes.
  3. Copy functions.php from /themes/hueman (the original theme), into /themes/hueman-child-master (child theme folder)
  4. Add this code snippet from David Tiong’s website. This will fix all errors, excluding archives pages (category, author)
  5. Remember to switch from the original theme to the child theme, under Appearance – Themes.
  6. To fix the remaining errors in the author and category pages, you have to copy content.php from the original theme, into the child theme folder.
  7. Make sure the content.php looks like this:

<article id="post-<?php the_ID(); ?>" <?php post_class('group'); ?>>
" title=""> /img/thumb-medium.png" alt="" /> '; ?> '; ?> '; ?> ">
<!--/.post-thumbnail--> <!--/.post-meta--> <h2 class="post-title"> <span class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></span> </h2><!--/.post-title--> <?php if (ot_get_option('excerpt-length') != '0'): ?>
<!--/.entry--> <?php endif; ?> </div><!--/.post-inner--> </article><!--/.post-->

It was a long night, and I was a little fuzzy when putting it all together, but this should mostly be it. Pop a comment if it doesn't work!

Related read: Hueman theme and Google Authorship

Advertisements

Post-2014 thoughts.

Ahh, good old 2014. It’s certainly been another year of new milestones and new surprises. Life being what it is though, has “trained” me to be at peace and roll with the punches. React, adapt, and survive.

Here we go with the recap once more.

  • Family:
    • The birth of our little boy Keilen obviously tops the list. It’s been fun (and tiring) having him on board. You don’t realise how much better a toddler is until a newborn comes along and you go ohfucknotthisagain. I’m still struggling to see the family resemblance (physically). He does however bear a few of my personality quirks. He’s quiet and pretty introspective. Has a seeming interest in books (holding ’em and staring at ’em, I don’t call this reading yet), stubborn, but likely has a wilder streak in him than I ever had in me.
    • Elly has been a real handful this year. For more than half the year, it was a real trial with tons of frustration and patience needed every single day, but I’m glad it’s all worked out. She eats her meals with minimal fuss. She goes to bed on time and sleeps without kicking up a fuss. We’ve weaned her off the need for bottled milk. To top it off, she’s toilet-trained in less than a month. I’ve definitely built a better bond with her this year, and I think we’ve done pretty well, all in all. She’s extroverted and an absolute dynamo. Articulates her thoughts well, and is a devious little bugger. Adorable as hell when she’s not crying up a storm. Can’t ask for much else!
    •  Thankful to mum for being around and helping us with the kids and house. We would have never been able to cope otherwise.
    • Not forgetting Stan, who’s gone on a journey to a new role and a new wardrobe, new fitness routine this year. Always good to have him around, and glad to see him growing. Much thanks to his help on PnR as well, when it comes to editing and prepping the newsletter on emergency duty. Unlike many other siblings out there, I know I can count on my brother when the going gets tough.
    • Lastly, the wife of course. Like every other couple out there, there are things I wish that could’ve been done better (and vice versa) but let’s talk about the positives. She’s been a pillar of endurance through the quirky sleep hours while juggling everything else, and gamely keeps up with whatever needs to be done without much complaint. It’s been a tough year without much rest, but we survived! She still doesn’t like to say it out, but love is still a part of the equation.
  • The Pick and Roll (PnR):
    • A year feels like ten years, when it comes to this topic. In its second season now, and slowly gaining traction. The main challenge as always, is getting and keeping committed people on board. Different priorities for different people, and we all have our own limits on time. I can understand how difficult it is for people to buy into a long-term vision, when there is no immediate benefit. Nevertheless, it’s all about moving on with what we have, and growing. Growing our content, growing our reach, and growing our relationships. Nothing is built in a day, it’s only with steady progress that we can get anywhere at all.
    • That being said, manning the site on all fronts (newsletter, Aussies in the NBA, article promos/general NBA content on Facebook page, editing, advertising, strategy, commercial, backend) has definitely taken a toll. I don’t see myself being able to take on any more without collapsing. The next phase of growth will have to be getting existing guys to commit and expand their roles, so to speak.
    • Once again, thankful for #TeamPnR’s existence, and especially the growth of our core. From Steve (and also Dean) manning the NBL, to Damian’s consistent work on NCAA and Europe, to Terry’s creative input and eye on the Twitter front, we also welcomed Olgun, who’s been an invaluable asset on various ends. Shout out to Darrel as well, who’s taken more on board and committed to attending the games despite having a newborn boy in the equation. Same to Alistar, who’s finally joined us and is making a difference to the video side of things. Same to the NBL team, new (e.g. Sam, Shay, Tom) and old. Of special note, S/O to Grant for consistent excellence. On the NBA team, having committed new guys like Daina, Winston alongside vets like Michael, Luke, Darrel has been great. It’s unfortunate that we lost guys like Craig and Josh H but nevertheless, thankful for their contributions.
    • Partners: We’ve really done well on this end, this year. Multiple new advertisers, some great partnerships especially with the NBA Store AU, the Melbourne Boomers and Melbourne United. More than revenue, it’s just about getting to know people in the industry and learning where we can help and help alike. As always, it’s all about who you know!
    • Backend: It’s been a race to jiggle with moving parts to see what works. Took Cloudflare out and used only CloudProxy. Reducing image sizes to improve loading time. Reducing the number of plugins has been a tough juggle between functionality and speed. Finding the right plugins and making them work right, each a quest in itself. Working with OpenGraph to make the metadata right has been a learning curve. Site/social analytics? Educational.
  • Work: Started work at ChannelAdvisor. Working in an international environment and learning to cope with time zones is a new experience, and so is the learning curve on Windows Server/Active Directory. This place is also the first real (culturally) Aussie workplace that I’m working at, and it’s been a really fun ride so far. Great people at the office, I have entertaining lunches with the guys (oi yer) and to top it off I have a fantastic manager who doesn’t micro-manage. Nothing much to complain about, really.
  • Travel:
    • New milestone, travelled to Shanghai on work. It was a real eye opener, seeing the stark contrasts between glitzy skyscrapers and aged housing. Reminds me of the effects rapid industrialisation has on society.
    • Outside of that, it’s been seemingly endless flights to Singapore. Once for Honda, and once for Yunlong. Wouldn’t have missed their big moments for anything else, and I’m glad I was there.
    • V and I also had a quick Christmas getaway at Olinda this year, which was great. We haven’t been spending a lot of time together due to everything else (read: own ventures and kids), so bonding time was definitely needed.
  • Basketball: Pretty bad. Been too tired to ball, so it’s only been the occasional Caulfield session on weekday nights. I’ve played a couple of games at MSAC as a sub for league night, but that’s been it. Will attribute main causes to 1. new kid and 2. PnR.
  • Gaming: I’ve played a grand total of one game on the PS4 after getting it as a present, which was Assassin’s Creed: Black Flag. Went back to the PS3 and got hooked on Kingdoms of Amalur: Reckoning. Stopped after I ran out of time at night. The thing about gaming: you really need a sizable stretch of time to game hard, and I seldom get that luxury anymore with PnR sucking up the bulk of my free time. Another regretful sacrifice for the greater good, it seems.
  • Health: To be honest, this year has been shit. I’ve been ill more times than I’ve cared to count. I remember a ear infection, eye infection, and countless little niggly stuff that’s come and gone. Not to mention good old hay fever. Best of all, a long overdue tooth extraction on New Year’s Eve to top it off. Just looking forward to 2015 and a better run ahead.
  • Friends: A definite drop off this year.
    • We’ve been eating at home most of the time, it’s been a lot harder to get out to dinner with two kids in tow. Thanks to the usual guys for taking the effort to catch up though: Bill, Jasmine, Benny especially. Lester’s left and gone back, which is a shame.
    • It’s also been great catching up with friends in Singapore – well, whoever I managed to meet up with anyway. The trips were all really short, and I didn’t have much time to meet all the people I would’ve liked to meet.
    • Nanzhen and Meishan actually made it over to Melbourne this year! They certainly surprised me at the office, and it’s been great having them over here for a few days, and just enjoying their company over here for a change. Thanks too to Huijia for catching up in Melbourne – always great to see an old friend! And to Vale too for taking the time to KTV in Melbourne!
  • Tech: Learning new stuff like MDT on Windows Server, something I would’ve never bothered to learn if not for work. reddit is such an amazing resource. Continual learning on WordPress once more, it’s amazing how much motivation there is to get better on WP for PnR’s sake – I’ve never experimented so hard on WP on this site before. Not forgetting the field of study that is Facebook marketing. I’m pretty sure I can function as a semi-decent social media admin for a full-time job, if one exists.

Above all of these?

I’ve learnt to be more patient, and that sometimes, the fastest way forward is to take a deep breath, and take a step back. Learning to work beyond trivial issues, and focus on the desired outcome. The big picture matters more than the solution, at times.

I’ve also learnt that I can’t function on five hours of sleep indefinitely, and that I actually need more sleep as I get older. Which sucks. Why can’t I be like Tianxiang and function like the superman he is! Insanely jealous, damn you genes.

I’m also learning to love myself a little more when it comes to relationships, and spend my time wisely. From now on, it will only on an equal basis. I will only invest the time and effort that I get in return, nothing more. Like Vale said, need effort on both parts to maintain friendships – too true!

Resolutions for new year?

  • I want to spend more time with the kids, and
  • Secondly, get back into playing basketball.
  • I want to get out on another trip to the US.
  • I need to stop backing Kickstarter campaigns so much because they are hit-and-miss, and horribly slow.
  • Most importantly, I want to stay effing healthy. Health is wealth, period.

And lastly, always appreciative of every single day I spend in good old Melbourne. It’s been a fantastic journey ever since I got here, and I can only imagine how much more ordinary the road would have been, had I stayed on. Love the air, crazy weather, the people, the friends, everything here.

Hello 2015. I’m looking forward to the year ahead.