Support » Everything else WordPress » [Plugin: LinkedIn hResume] hResume Customizations

  • I just wanted to say great job on the plugin. I took the liberty to add a few new features on my site,

    I went looking for a plugin awhile back to fulfill a simple requirement of mine – make it easy to keep my resume up to date. The hResume plugin has fulfilled this need. I had a few extra things I wanted to get out of it, such as export to PDF and experience tag clouds. These aren’t, as far as I can tell, in the initial intentions of this plugin, but were beneficial to me.

    Nice job and thanks!

Viewing 4 replies - 1 through 4 (of 4 total)
  • OK, I don’t get it.
    I installed hResume. It’s supposed to generate a new page. It doesn’t. I checked out the tree structure of my blog. Nothing.
    Do you have any thoughts on the matter?

    @esiegel Don’t forget step #6 in the installation instructions:

    I second swosko’s praise for your plug-in. Simple and straightforward, it was pretty much exactly what I needed for a client’s site who just didn’t want to have keep updating his résumé in so many places. He wanted to show his LinkedIn résumé almost verbatim, with just a couple of items removed, and your plug-in did this with the least meddling.

    Just a couple quick suggestions for possible enhancements:

    • Remove LinkedIn-specific stuff like “My connections” link.

    • Strip out the “more” and “less” links that may appear in Past Experience section of the Summary block.

    * Add some options for the output of the resume, such as showing or hiding certain block and individual elements (e.g. the Summary). Perhaps beyond the scope of this plug-in…

    * Consider adding a filter hook so people can do further modifications to the output code. Something like this:

    function lnhr_stripout_hresume($content) {
      $hresume = apply_filters( 'lnhr_resume', $hresume );
      return $hresume;

    For my purposes, I added the filter hook mentioned above and then did some further parsing outside the plug-in to remove unwanted elements. I used PHP DOMDocument to convert the résumé so I could find and remove nodes without complicated regexes (why don’t more people do this?).

    // tidy up output of LinkedIn hResume plug
    add_filter('lnhr_resume', 'lnhr_tidy');
    function lnhr_tidy($content) {
      $doc = new DOMDocument("1.0", get_option('blog_charset'));
      $xpath = new DOMXPath($doc);
      DOMremoveHTMLElements($xpath, 'id', 'overview');
      DOMremoveHTMLElements($xpath, 'id', 'additional-information');
      DOMremoveHTMLElements($xpath, 'class', 'adr');
      DOMremoveHTMLElements($xpath, 'class', 'actions');
      DOMremoveHTMLElements($xpath, 'class', 'organization-details');
      DOMremoveHTMLTags($doc, 'hr');
      $content = preg_replace('%^.*<body>|</body>.*$%si', '', $doc->saveHTML());
      return $content;
    function DOMremoveHTMLTags($doc, $search) {
      $tags = $doc->getElementsByTagName($search);
      $tagsToRemove = array(); //
      foreach ($tags as $tag) {
        $tagsToRemove[] = $tag;
      foreach ($tagsToRemove as $tag) {
    function DOMremoveHTMLElements($xpath, $type, $search) {
      $elements = $xpath->query("//*[@$type='$search']");
      if (!is_null($elements)) {
        foreach ($elements as $element) {

    Cheers, and thanks again for the nice plug-in!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: LinkedIn hResume] hResume Customizations’ is closed to new replies.