{"id":575,"date":"2012-05-20T00:40:42","date_gmt":"2012-05-19T23:40:42","guid":{"rendered":"http:\/\/basics.4design.tl\/?p=575"},"modified":"2012-05-20T01:29:35","modified_gmt":"2012-05-20T00:29:35","slug":"version-0-3-2-for-basics-and-beyond-basics","status":"publish","type":"post","link":"https:\/\/4design.xyz\/wordpress-basics\/version-0-3-2-for-basics-and-beyond-basics","title":{"rendered":"Version 0.3.2 for Basics and Beyond Basics"},"content":{"rendered":"<p>The basic theme<strong> Basics<\/strong> and the child theme<strong> Beyond Basics<\/strong> are at version 0.3.2. Some modifications are cosmetics while others fixes bugs more or less annoying. The three more important updates are about: the main and the second loop located in the <em>home.php<\/em> file; a display issues of the Search form when using the Search Widget; and a brand new grid system.<!--more--><\/p>\n<h2>$do_not_duplicate improved<\/h2>\n<p>First, I modified the main loop by changing <em>$do_not_duplicate<\/em> in order to receive an Array:\u00a0<em>$do_not_duplicate[]<\/em>. Second, I have excluded the duplicate posts by using<em> &#8216;post__not_in&#8217; =&gt; $do_not_duplicate<\/em> in the second loop.\u00a0These changes fixes a probleme: when there is no &#8220;sticky posts&#8221;, the number of posts within the second loop doesn&#8217;t match the number of <em>posts_per_page<\/em>.<\/p>\n<h2>Just one Search Widget at a time!<\/h2>\n<p>The design\u00a0of the function\u00a0<em>basics_searchform()<\/em> caused\u00a0doubling\u00a0of the search\u00a0when using\u00a0the\u00a0Search\u00a0widget. My friend\u00a0<a href=\"http:\/\/www.jubianchi.fr\">Julien\u00a0Bianchi<\/a> (@jubianchi) has proposed\u00a0a solution that\u00a0fixed the problem. It&#8217;s a french webdevelopper who use Basics as a fondation for its own WordPress Theme &#8212; <a href=\"https:\/\/github.com\/jubianchi\/wp-bootstrap\">wp-bootstrap<\/a> &#8212;\u00a0which aims to mix Basics with Bootstrap, from Twitter.<\/p>\n<h2>Two grid systems, please!<\/h2>\n<p>Last but not least, I have changed the grid system. Although it is not enabled by default, I&#8217;ve updated the grid layout with <a href=\"http:\/\/css.4design.tl\/940-css-fluide\">940-fluid.css<\/a> and <a href=\"http:\/\/css.4design.tl\/940-css\">940.css<\/a>, renamed to <em>grid-fixed.css<\/em> and <em>grid-fluid.css<\/em>. These two style sheets are located in the <em>\/css<\/em> folder.\u00a0These grids\u00a0can be activated\u00a0by removing the\u00a0comments in the file\u00a0<em>styles.css<\/em>\u00a0located within WordPress Basics.<\/p>\n<h2>Here are the complete changelogs<\/h2>\n<h3>WordPress Basics<\/h3>\n<p><strong>Release 0.3.2 &#8211; 20\/05\/2012<\/strong><\/p>\n<ol>\n<li>Update\u00a0<strong>[css\/normalize.css]<\/strong>\u00a0<strong>[css\/tool.css]<\/strong>\u00a0and\u00a0<strong>[css\/author.css]<\/strong>\u00a0from new version of HTML5 Boilerplate 3.0.2<\/li>\n<li>Rename\u00a0<em>modernizr-2.5.3.min.js<\/em>\u00a0to\u00a0<em>modernizr.js<\/em>\u00a0for easily maintenance and updates\u00a0<strong>[header.php]<\/strong><\/li>\n<li>Rename\u00a0<em>\/js\/libs\/modernizr-2.5.3.min.js<\/em>\u00a0to\u00a0<em>\/js\/libs\/modernizr.js<\/em><\/li>\n<li>Rename\u00a0<em>jquery-1.7.1.min.js<\/em>\u00a0to\u00a0<em>jquery.js<\/em>\u00a0within\u00a0<em>basics_jquery()<\/em>\u00a0function\u00a0<strong>[inc\/functions-filter-action.php]<\/strong><\/li>\n<li>Rename\u00a0<em>\/js\/libs\/jquery-1.7.1.min.js<\/em>\u00a0to\u00a0<em>\/js\/libs\/jquery.js<\/em><\/li>\n<li>fix\u00a0<em>basics_searchform()<\/em>\u00a0to avoid duplicate form when adding widget Search\u00a0<strong>[inc\/functions-filter-action.php]<\/strong>(thanks @jubianchi)<\/li>\n<li>Add\u00a0<em>echo basics_searchform()<\/em>\u00a0to display\u00a0<em>basics_searchform()<\/em>\u00a0since the fix above\u00a0<strong>[sidebar.php]<\/strong><\/li>\n<li>Change\u00a0<em>id=search-in<\/em>\u00a0to\u00a0<em>class=search-in<\/em>\u00a0to have the possibility of several search form\u00a0<strong>[inc\/functions-filter-action.php]<\/strong><\/li>\n<li>Add\u00a0<em>basics_search_autofocus()<\/em>\u00a0to print autofocus attribute to search form when\u00a0<em>is_search()<\/em>\u00a0<strong>[inc\/functions-filter-action.php]<\/strong><\/li>\n<li>Update the grid system: you can now use a fluid and fixed grid based on the width of 940px.\u00a0<strong>[style.css]<\/strong><\/li>\n<li>Tweak indentations et comments for legibility purposes\u00a0<strong>[content.php]<\/strong><\/li>\n<\/ol>\n<h3>Beyond Basics<\/h3>\n<p><strong>Release 0.3.2 &#8211; 20\/05\/2012<\/strong><\/p>\n<ol>\n<li>Change\u00a0<code>$do_not_duplicate = $post-&gt;ID;<\/code>\u00a0for\u00a0<code>$do_not_duplicate[] = $post-&gt;ID;<\/code>\u00a0in the first loop\u00a0<strong>[home.php]<\/strong><\/li>\n<li>Add\u00a0<code>'post__not_in' =&gt; $do_not_duplicate<\/code>\u00a0in the second loop\u00a0<strong>[home.php]<\/strong>\u00a0The two changes above are made to fix a probleme : when no sticky posts exist, the number of posts within the second loop doesn&#8217;t match the<code>posts_per_page<\/code>&#8216;s number.<\/li>\n<li>Remove\u00a0<code>margin-top: 1.539em;<\/code>\u00a0<strong>[css\/author.css]<\/strong><\/li>\n<li>Add\u00a0<em>echo basics_searchform()<\/em>\u00a0to display\u00a0<em>basics_searchform()<\/em>\u00a0since the fix\u00a0<strong>[home.php]<\/strong>\u00a0<strong>[404.php]<\/strong>\u00a0<strong>[sidebar.php]<\/strong>(cf. Basics&#8217;s CHANGELOG.txt)<\/li>\n<li>Change\u00a0<em>#search-in<\/em>\u00a0to\u00a0<em>.search-in<\/em>\u00a0to reflect changes made in Basics\u00a0<em>inc\/functions-filter-action.php<\/em>\u00a0<strong>[author.css]<\/strong><\/li>\n<li>Remove\u00a0<code>width:900px<\/code>\u00a0in\u00a0<em>#site-description<\/em>\u00a0rule to avoid display issue when viewport is resised\u00a0<strong>[author.css]<\/strong><\/li>\n<li>Remove &lt;<code>style&gt;<\/code>\u00a0for\u00a0<em>Google Search<\/em>\u00a0*\/ from\u00a0<strong>[404.php]<\/strong>\u00a0to add it in\u00a0<strong>[author.css]<\/strong><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>The basic theme Basics and the child theme Beyond Basics are at version 0.3.2. Some modifications are cosmetics while others fixes bugs more or less annoying. The three more important updates are about: the main and the second loop located in the home.php file; a display issues of the Search form when &hellip; <a href=\"https:\/\/4design.xyz\/wordpress-basics\/version-0-3-2-for-basics-and-beyond-basics\" rel=\"nofollow\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[165,166,139,167],"_links":{"self":[{"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts\/575"}],"collection":[{"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/comments?post=575"}],"version-history":[{"count":0,"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/posts\/575\/revisions"}],"wp:attachment":[{"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/media?parent=575"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/categories?post=575"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/4design.xyz\/wordpress-basics\/wp-json\/wp\/v2\/tags?post=575"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}