{"id":3830,"date":"2014-05-06T22:24:04","date_gmt":"2014-05-06T22:24:04","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=3830"},"modified":"2016-01-21T14:14:17","modified_gmt":"2016-01-21T22:14:17","slug":"twenty-fourteen-theme-customization","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/twenty-fourteen-theme-customization.html","title":{"rendered":"Twenty Fourteen Theme Customization"},"content":{"rendered":"<p style=\"text-align: center;\"><i>WordPress 3.9 came out and theme Twenty Fourteen came with it. The theme is great, but it does kill many of the mootools and older jqueries scripts that I&#8217;ve been using like Mediabox Advance and FancyBox 1.3.4. Anyhow, this is how I modified a Twenty Fourteen Theme. My goal is to have 3 colors on the page gradually lightened &#8211; I called my <a title=\"idog experiment\" href=\"\/\/www.dognmonkey.com\/techs12\" target=\"_blank\">twenty fourteen &#8211; black<\/a> because I like dark themes. I read many fixes and posts on the websites and I try to give credit to the original writers, but some I really forgot where I got my information from, I&#8217;m really sorry.<\/i><\/p>\n<p style=\"text-align: center;\"><i>[title]Add Excerpts and Thumbnails To Index Front Page[\/title][body]<\/i><\/p>\n<p style=\"text-align: center;\"><em>The first thing I want to do is to add excerpts and thumbnails to the index &#8211; front page. For the thumbnails, I get the <a title=\"get_the_image.php\" href=\"\/\/themehybrid.com\/plugins\/get-the-image\" target=\"_blank\">&#8220;get_the_image.php&#8221;<\/a> and place it in the original Twenty Fourteen theme. Add the scripts to the function.php<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">if (!function_exists(&#8216;get_the_image&#8217;)) {<br \/>\nrequire_once &#8220;get-the-image.php&#8221;;<br \/>\n}<br \/>\nfunction custom_excerpt_length( $length ) {<br \/>\nreturn 50;<br \/>\n}<br \/>\nadd_filter( &#8216;excerpt_length&#8217;, &#8216;custom_excerpt_length&#8217;, 999 );<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><i>I also need to edit the content.php of the original theme to display thumbnails size and excerpts<\/i><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">&lt;?php if ( is_search()||is_author()||is_tag()||is_archive()||is_home() ) : \/\/ Only display Excerpts for Search ?&gt;<br \/>\n&lt;div class=&#8221;entry-summary&#8221;&gt;<br \/>\n&lt;?php<br \/>\nget_the_image( array( &#8216;size&#8217; =&gt; &#8216;main&#8217;, &#8216;width&#8217; =&gt; 200, &#8216;height&#8217; =&gt; 114, &#8216;before&#8217; =&gt; &#8216;&lt;div class=&#8221;cover&#8221;&gt;&#8217;, &#8216;after&#8217; =&gt; &#8216;&lt;\/div&gt;&#8217; ) );<br \/>\n?&gt;<br \/>\n&lt;?php the_excerpt(); ?&gt;<br \/>\n&lt;\/div&gt;&lt;!&#8211; .entry-summary &#8211;&gt;<br \/>\n&lt;?php else : ?&gt;<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><em>Now the index &#8211; front page should look like this. I can change the excerpts from 50 to any size of words I want.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"get_the_image file in the theme folder\" href=\"\/media\/techs\/theme2014\/sm_get_the_image.jpg\" target=\"_blank\" rel=\"lightbox[2014]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"\/media\/techs\/theme2014\/tn_get_the_image.jpg\" alt=\"\" width=\"250\" height=\"75\" \/><\/a>\u00a0 \u00a0 \u00a0<a class=\"preview\" title=\"Thumbnails and Excerpts on Front Page\" href=\"\/media\/techs\/theme2014\/sm_excerpt_thumbnails.jpg\" target=\"_blank\" rel=\"lightbox[2014]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"\/media\/techs\/theme2014\/tn_excerpt_thumbnails.jpg\" alt=\"thumbnails and excerpts on front page\" width=\"250\" height=\"138\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>[\/body]<\/em><\/p>\n<p style=\"text-align: center;\"><em>[title1]Create Child Theme For Twenty Fourteen[\/title1][body1]<\/em><\/p>\n<p style=\"text-align: center;\"><em>If you have many blogs like I do, and you want many different color themes for each blog, the best is to use child theme. To create a child theme, I create a folder for the theme and inside the folder, I should have a modified style.css and a css folder with modified ie.css in it.<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"childtheme folder\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childtheme.jpg\" rel=\"lightbox[ie8]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3838\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childtheme-300x128.jpg\" alt=\"child theme folder\" width=\"300\" height=\"128\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childtheme-300x128.jpg 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childtheme.jpg 617w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"child theme css folder\" href=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childthemecss.png\" rel=\"lightbox[ie8]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-3833\" src=\"\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childthemecss-300x179.png\" alt=\"child theme css folder\" width=\"300\" height=\"179\" srcset=\"https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childthemecss-300x179.png 300w, https:\/\/www.dognmonkey.com\/techs\/wp-content\/uploads\/2014\/05\/childthemecss.png 362w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>At the beginning of the child theme style.css, I replaced everything on the top with my information &#8211; important thing is the @import command<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">\/*<br \/>\nTheme Name: Twenty Fourteen black1600<br \/>\nTheme URI: \/\/example.com\/twenty-fourteen-child\/<br \/>\nDescription: Twenty Fourteen Child Theme<br \/>\nAuthor: idog<br \/>\nAuthor URI: \/\/www.dognmonkey.com\/techs<br \/>\nTemplate: twentyfourteen<br \/>\nVersion: 1.0.0<br \/>\nTags: light, dark, two-columns, right-sidebar, responsive-layout, accessibility-ready<br \/>\nText Domain: twenty-fourteen-child<br \/>\n*\/<br \/>\n@import url(&#8220;..\/twentyfourteen\/style.css&#8221;);<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><em>Next, to fix the color of the internet explorer 8\/9, I had to add some codes in the function.php, <a title=\"ie8-9 fix\" href=\"\/\/wordpress.org\/support\/topic\/ie8ie9-problem\" target=\"_blank\">the original codes are here<\/a>\u00a0by fatpat76.<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">function mytheme_dequeue_styles() {<br \/>\nwp_dequeue_style( &#8216;twentyfourteen-ie&#8217; );<br \/>\n}<br \/>\nadd_action( &#8216;wp_enqueue_scripts&#8217;, &#8216;mytheme_dequeue_styles&#8217;, 11 );<br \/>\n\/\/add new from child theme<br \/>\nwp_enqueue_style( &#8216;mytheme-ie&#8217;, get_stylesheet_directory_uri() . &#8216;\/css\/ie.css&#8217;, array( &#8216;twentyfourteen-style&#8217; ), &#8216;1.0&#8217; );<br \/>\n$wp_styles-&gt;add_data( &#8216;mytheme-ie&#8217;, &#8216;conditional&#8217;, &#8216;lt IE 9&#8217; );<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><em>Now, I&#8217;m ready to change colors and format of the style.css that I like to have for my theme.<\/em><\/p>\n<p style=\"text-align: center;\"><em>[\/body1]<\/em><\/p>\n<p style=\"text-align: center;\"><em>[title2]Modify Child Theme style.css[\/title2][body2]<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: center;\"><em>3 Shades of color will be used : content = #111111 (darkest), primary-sidebar-header-footer = #191919 (lighter) , background = #1d1d1d (lightest).<\/em><\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><em>Center the page on larger screen : I need to add these codes in the style.css.<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">#page {<br \/>\nmargin-left: auto;<br \/>\nmargin-right: auto;<br \/>\n}<\/p>\n<\/blockquote>\n<p>&nbsp;<\/p>\n<p style=\"text-align: center;\"><em>Change the site background color and size from 1260px to 1366px:<\/em><\/p>\n<p>&nbsp;<\/p>\n<blockquote>\n<p style=\"text-align: left;\">.site {<br \/>\nbackground-color: #111111;<br \/>\nmax-width: 1366px;<br \/>\nposition: relative;<br \/>\n}<\/p>\n<p style=\"text-align: left;\">body,<br \/>\nbutton,<br \/>\ninput,<br \/>\nselect,<br \/>\ntextarea {<br \/>\ncolor: #aaa;\/*#2b2b2b;idog*\/<br \/>\nfont-family: Comic Sans MS,Lucida Sans Unicode,Arial,Helvetica,sans-serif, Lato;<br \/>\nfont-size: 16px;<br \/>\nfont-weight: 400;<br \/>\nline-height: 1.5;<br \/>\nfont-style:italic;<br \/>\n}<\/p>\n<p>body {<br \/>\nbackground-color: #191919;\/*backgroundidog*\/<br \/>\n}<\/p>\n<p style=\"text-align: left;\">a {<br \/>\ncolor: #cf3822;\/*#24890d;idog*\/<br \/>\ntext-decoration: none;<br \/>\n}<\/p>\n<p style=\"text-align: left;\">.site-header {<br \/>\nbackground-color: #191919;\/*#000;*\/<br \/>\nmax-width: 1366px;<br \/>\nposition: relative;<br \/>\nwidth: 100%;<br \/>\nz-index: 4;<br \/>\n}<\/p>\n<p style=\"text-align: left;\">.site-footer {<br \/>\n\/*border-top: 4px solid #666;\/*borderidog *\/<br \/>\nbackground-color: #191919;\/*#000;idog*\/<br \/>\nfont-size: 12px;<br \/>\nposition: relative;<br \/>\nz-index: 3;<br \/>\n}<\/p>\n<p style=\"text-align: left;\">.site:before {<br \/>\nbackground-color: #191919;\/*primary-sidebar idog*\/<\/p>\n<p style=\"text-align: left;\">@media screen and (min-width: 1366px) {<br \/>\n.site-content blockquote.alignleft,<br \/>\n.site-content blockquote.alignright {<br \/>\nwidth: -webkit-calc(50% + 18px);<br \/>\nwidth: calc(50% + 18px);<br \/>\n}<\/p>\n<p>blockquote {<br \/>\nbackground: #191919;<br \/>\npadding: 2%;<br \/>\ncolor: #eee;\/*#767676;*\/<br \/>\nfont-size: 16px;<br \/>\nfont-style: italic;<br \/>\nfont-weight: 300;<br \/>\nline-height: 1.2631578947;<br \/>\nmargin-bottom: 24px;<br \/>\n}<br \/>\n\/* Input fields *\/<\/p>\n<p style=\"text-align: left;\">input,<br \/>\ntextarea {<br \/>\nborder: 1px solid #666;\/*rgba(0, 0, 0, 0.1);idog*\/<br \/>\n\/* border-radius: 2px;*\/<br \/>\ncolor: #aaa;\/*#2b2b2b;*\/<br \/>\npadding: 8px 10px 7px;<br \/>\nbackground:#191919;\/*comment area backgroundidog*\/<br \/>\n}<\/p>\n<p style=\"text-align: left;\">input[type=&#8221;button[\/title][body],<br \/>\ninput[type=&#8221;reset[\/title][body],<br \/>\ninput[type=&#8221;submit[\/title][body] {<br \/>\nbackground-color: #191919;<\/p>\n<p style=\"text-align: left;\">.site-content .entry-meta {<br \/>\nbackground-color: #111111;\/*#fff;\/*content text*\/<br \/>\nmargin-bottom: 8px;<br \/>\n}<\/p>\n<p style=\"text-align: left;\">.entry-meta .tag-links a {<br \/>\nbackground-color: #191919;\/*backgroundidog#767676; idog*\/<br \/>\nborder-radius: 0 2px 2px 0;<br \/>\ncolor: #cf3822;\/*coloridog*\/<\/p>\n<p style=\"text-align: left;\">.paging-navigation a:hover {<br \/>\nborder-top: 5px solid #666;\/*;idog*\/<br \/>\ncolor: #ff6611;\/*coloridog #2b2b2b;*\/<br \/>\nbackground:#191919;\/*idog add*\/<br \/>\n}<\/p>\n<p style=\"text-align: left;\">.comment-content {<br \/>\n-webkit-hyphens: auto;<br \/>\n-moz-hyphens: auto;<br \/>\n-ms-hyphens: auto;<br \/>\nhyphens: auto;<br \/>\nword-wrap: break-word;<br \/>\nbackground: #191919;\/*idog*\/<br \/>\npadding:10px;\/*idog*\/<br \/>\n}<\/p>\n<p style=\"text-align: left;\">#secondary {<br \/>\nbackground-color: #191919;\/*backgroundidog*\/<br \/>\nborder-top: 1px solid #000;<br \/>\nborder-bottom: 1px solid rgba(255, 255, 255, 0.2);<br \/>\nclear: both;<br \/>\ncolor: rgba(255, 255, 255, 0.7);<br \/>\nmargin-top: -1px;<br \/>\npadding: 0 10px;<br \/>\nposition: relative;<br \/>\nz-index: 2;<br \/>\n}<\/p>\n<p>.widget textarea {<br \/>\nbackground-color: #191919;\/*rgba(255, 255, 255, 0.1); searchbox left column*\/<br \/>\nborder-color: rgba(255, 255, 255, 0.2);<br \/>\ncolor: #fff;<br \/>\nfont-size: 16px;<br \/>\npadding: 1px 2px 2px 4px;<br \/>\n}<\/p>\n<p>.content-sidebar .widget textarea {<br \/>\nbackground-color: #191919;\/*#fff;searchbox right column*\/<br \/>\nborder-color: rgba(0, 0, 0, 0.1);<br \/>\ncolor: #bbb;\/*#2b2b2b;idog*\/<br \/>\n}<\/p><\/blockquote>\n<p style=\"text-align: center;\"><em>[\/body2]<\/em><\/p>\n<p style=\"text-align: center;\"><ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul><\/p>\n","protected":false},"excerpt":{"rendered":"<p>WordPress 3.9 came out and theme Twenty Fourteen came with it. The theme is great, but it does kill many of the mootools and older jqueries scripts that I&#8217;ve been using like Mediabox Advance and FancyBox 1.3.4. Anyhow, this is how I modified a Twenty Fourteen Theme. My goal is to have 3 colors on <a href=\"https:\/\/www.dognmonkey.com\/techs\/twenty-fourteen-theme-customization.html\" class=\"more-link\">&#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[288,26,20],"tags":[463],"class_list":["post-3830","post","type-post","status-publish","format-standard","hentry","category-css-wordpress","category-themes","category-wordpress","tag-twenty-fourteen"],"views":466,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3830","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/comments?post=3830"}],"version-history":[{"count":3,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3830\/revisions"}],"predecessor-version":[{"id":5406,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/3830\/revisions\/5406"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=3830"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=3830"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=3830"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}