{"id":3526,"date":"2015-02-03T16:41:34","date_gmt":"2015-02-03T21:41:34","guid":{"rendered":"http:\/\/peroty.com\/blog\/?p=3526"},"modified":"2015-02-03T16:41:34","modified_gmt":"2015-02-03T21:41:34","slug":"updating-my-books-ive-read-page-with-a-little-help-from-my-friends","status":"publish","type":"post","link":"https:\/\/peroty.com\/blog\/wrote-about\/updating-my-books-ive-read-page-with-a-little-help-from-my-friends\/","title":{"rendered":"Updating my Books I&#8217;ve Read page with a little help from my friends"},"content":{"rendered":"<p>For as long as I&#8217;ve had my <a href=\"http:\/\/peroty.com\/blog\/books\/\">books I&#8217;ve read page<\/a> up, I wasn&#8217;t entirely happy with it. So I decided to change the implementation to <a href=\"https:\/\/github.com\/jamietr1\/wp-reading-list-shortcode\">Jamie Rubin&#8217;s Shortcode method<\/a>. Which was what my other method was based on anyway.<\/p>\n<p>I learned how to create a child theme for WordPress so my changes wouldn&#8217;t get wiped out the next time the theme was updated. I downloaded the function.php file into it and pointed it at my <a href=\"https:\/\/dl.dropboxusercontent.com\/u\/727101\/blog\/books\/books.txt\">Dropbox book list<\/a>.<\/p>\n<p>All was going well except I had an extra parenthesis on all the dates.<br \/>\nExample: <code>This Could Help by Patrick Rhone (1\/20\/2015))<\/code><\/p>\n<p>The last item on the list was missing its trailing parenthesis.<br \/>\nExample: <code>This Could Help by Patrick Rhone (1\/20\/2015<\/code><\/p>\n<p>Since I don&#8217;t speak code, I went looking for help from nerds greater than myself. They suggested two changes to make to the code and it worked perfectly.<\/p>\n<p><a href=\"http:\/\/www.mentalcloister.com\/\">Tony Giunta<\/a> suggested changing line 21.<br \/>\nOriginal: <code>$date = substr($second_part[1],0,-1);<\/code><br \/>\nChange: <code>$date = $second_part[1];<\/code><\/p>\n<p><a href=\"hackmake.org\">Nick Wynja<\/a> suggested changing line 54.<br \/>\nOriginal: <code>echo \"&lt;li&gt;$title by $author ($date)&lt;\/li&gt;\\n\";<\/code><br \/>\nChange: <code>echo \"&lt;li&gt;$title by $author ($date&lt;\/li&gt;\\n\";<\/code><\/p>\n<p>I am not a coder. They both commented on the quality of the code. I&#8217;m sure these changes (and all of this code) could have been written better and I&#8217;m sure lots of people have solutions and versions they&#8217;d tout as being superior. But this works for me, and with their help I was able to get it working in my WordPress setup.<\/p>\n<p><a href=\"https:\/\/github.com\/peroty\/wp-reading-list-shortcode\/blob\/patch-1\/functions.php\">Here is my changed version<\/a> on Github.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>For as long as I&#8217;ve had my books I&#8217;ve read page up, I wasn&#8217;t entirely happy with it. So I decided to change the implementation to Jamie Rubin&#8217;s Shortcode method. Which was what my other method was based on anyway. I learned how to create a child theme for WordPress so my changes wouldn&#8217;t get [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":"","jetpack_publicize_message":"New Post - Updating my Books I've Read page with a little help from my friends","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1],"tags":[794,533],"class_list":["post-3526","post","type-post","status-publish","format-standard","hentry","category-wrote-about","tag-site-notes","tag-wordpress"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/posts\/3526","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/comments?post=3526"}],"version-history":[{"count":3,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/posts\/3526\/revisions"}],"predecessor-version":[{"id":3539,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/posts\/3526\/revisions\/3539"}],"wp:attachment":[{"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/media?parent=3526"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/categories?post=3526"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peroty.com\/blog\/wp-json\/wp\/v2\/tags?post=3526"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}