{"id":591,"date":"2012-08-12T21:21:48","date_gmt":"2012-08-13T04:21:48","guid":{"rendered":"http:\/\/mattfife.com\/?p=591"},"modified":"2012-08-12T21:21:57","modified_gmt":"2012-08-13T04:21:57","slug":"wordpress-adventures","status":"publish","type":"post","link":"https:\/\/mattfife.com\/?p=591","title":{"rendered":"WordPress adventures"},"content":{"rendered":"<p>So, in case you didn&#8217;t notice, I updated my website&#8217;s look and feel.\u00a0 While I was at it, I upgraded to the latest version of WordPress (v3.4.1) from my pretty ancient version 2.? version I installed years ago.\u00a0 My, how things have improved.\u00a0 It all went pretty smoothly, but there were some good &#8216;gotchas&#8217; that I wanted to make note of.<\/p>\n<p>Tips:<\/p>\n<ol>\n<li><strong>Start from a template<\/strong> &#8211; The best way would simply to take one of the supplied ones and start modifying &#8211; as they are considered the canonical reference designs.\u00a0 I started from one from a great web design guy who has won numerous awards.\u00a0 He provides his &#8216;blank&#8217; theme as a zip, along with his <a href=\"http:\/\/webdesignerwall.com\/tutorials\/building-custom-wordpress-theme\">handy and time-saving tips<\/a> to get the job done faster.<\/li>\n<li><strong>Don&#8217;t touch the php files until you&#8217;re at finishing touches!\u00a0 Everything you probably do should be in the style.css file<\/strong> &#8211; Your temptation again and again will be to modify the HTML code in the header.php\/footer.php\/index.php\/etc files.\u00a0 DON&#8217;T do it.\u00a0 Use the style.css code to do what you need.\u00a0 Most of the templates have everything you need in them already &#8211; you just need to modify their appearance via their style.css information.\u00a0 Reasons?\u00a0 Most of the code in the canonical templates has been tested extensively on many different browsers and have stood the test of many trials.\u00a0 Yours has not.\u00a0 Anything in those files is forever static &#8211; no matter how your page is used.\u00a0 Single.php is used in several places &#8211; and in different formats.\u00a0 Futzing with anything other than the styles will likely break things.<\/li>\n<li><strong>Do all your development locally<\/strong>.\u00a0 <a href=\"http:\/\/sixrevisions.com\/tutorials\/web-development-tutorials\/using-xampp-for-local-wordpress-theme-development\/\">Set up a local XAMPP server <\/a>and develop your theme locally.\u00a0 Get everything working right &#8211; then publish.\u00a0 Saves you TONS of time and gives you experience installing wordpress.<\/li>\n<\/ol>\n<p>Special notes:<\/p>\n<ol>\n<li><strong>Syntax error, unexpected T_VARIABLE<\/strong><strong>on 1and1 hosting<\/strong>&#8211; When I installed my new, pristine version of WordPress on my 1and1 hosting, I got this error.\u00a0 I had done this before without issue, but then I found <a href=\"http:\/\/wordpress.org\/support\/topic\/getting-parse-error-syntax-error-unexpected-t_variable\" target=\"_blank\">this forum discussion <\/a>on the topic.\u00a0 Turns out 1and1 hosting hadn&#8217;t updated their PHP version.\u00a0 Add a <code>.htaccess<\/code> file to your root directory with only this inside :<br \/>\n<code>SetEnv PHP_VER 5<\/code><\/li>\n<li><strong>This does not appear to be a WXR file, missing\/invalid WXR version number<\/strong> when exporting\/importing from old WordPress version.\u00a0 I upgraded from an old 2.x version of wordpress to 3.4.1.\u00a0 I exported just find and got a nice, big .XML file with all my posts in it.\u00a0 When I went to import it though, I got that error.\u00a0 Turns out the old versions <a href=\"http:\/\/wordpress.org\/support\/topic\/xml-to-wxr-issue\" target=\"_blank\">didn&#8217;t put the version number in the file <\/a>when exporting it.\u00a0 I simply opened up the .XML file, and added the following line near the top.<br \/>\n<code>&lt;wp:wxr_version&gt;1.1&lt;\/wp:wxr_version&gt;<\/code><br \/>\nEverything imported like a champ.<\/li>\n<\/ol>\n<p>There were lots more notes, but I&#8217;ll save those for another time, as these were the big ones that took some digging around.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, in case you didn&#8217;t notice, I updated my website&#8217;s look and feel.\u00a0 While I was at it, I upgraded to the latest version of WordPress (v3.4.1) from my pretty ancient version 2.? version I installed years ago.\u00a0 My, how things have improved.\u00a0 It all went pretty smoothly, but there were some good &#8216;gotchas&#8217; that I wanted to make note of. Tips: Start from a template &#8211; The best way would simply to take one of the supplied ones and&#8230;<\/p>\n<p class=\"read-more\"><a class=\"btn btn-default\" href=\"https:\/\/mattfife.com\/?p=591\"> Read More<span class=\"screen-reader-text\">  Read More<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5],"tags":[],"class_list":["post-591","post","type-post","status-publish","format-standard","hentry","category-technical"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p4WECr-9x","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/591","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=591"}],"version-history":[{"count":3,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/591\/revisions"}],"predecessor-version":[{"id":594,"href":"https:\/\/mattfife.com\/index.php?rest_route=\/wp\/v2\/posts\/591\/revisions\/594"}],"wp:attachment":[{"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=591"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=591"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mattfife.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=591"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}