{"id":2252,"date":"2012-08-19T10:30:57","date_gmt":"2012-08-19T17:30:57","guid":{"rendered":"http:\/\/www.dognmonkey.com\/techs\/?p=2252"},"modified":"2012-08-19T10:30:57","modified_gmt":"2012-08-19T17:30:57","slug":"create-a-home-button-in-wordpress","status":"publish","type":"post","link":"https:\/\/www.dognmonkey.com\/techs\/create-a-home-button-in-wordpress.html","title":{"rendered":"Create A Home Button In WordPress"},"content":{"rendered":"<p style=\"text-align: center;\"><em>I think it&#8217;s a good <\/em>practice to <em>have a home link button at the end of every page for readers to get back to the main page.<\/em><\/p>\n<p style=\"text-align: center;\"><em><\/em><em>Create a graphic button or download the free icon on the net: 1 for main and 1 for hover. If there is only 1 image, just use Paint.net to change color and save for hover image.<br \/>\n<\/em><\/p>\n<p style=\"text-align: center;\"><em><\/em><em>Edit the style.css of the theme and create a home id.<\/em><\/p>\n<blockquote>\n<p style=\"text-align: left;\">#idoghome { font-size:14px; float:right;background:url(\/idogjs\/css\/home_48_hover.png) no-repeat right top; height:50px; padding:18px 0 0 55px; }<br \/>\n#idoghome:hover { background:url(\/idogjs\/css\/home_50.png) no-repeat right top; }<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\"><em><\/em><a class=\"preview\" title=\"create home button id in style.css\" href=\"\/media\/wpweb\/css\/homebuttoncss.jpg\" rel=\"lightbox[homebutton]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"create home button id in style.css\" src=\"\/media\/wpweb\/css\/tn_homebuttoncss.jpg\" alt=\"\" width=\"250\" height=\"11\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Edit single.php and page.php and place the codes to add the hombutton link to where ever on the page you want it to be. I put it after the content and before the link to the pages of the post.<br \/>\n<\/em><\/p>\n<blockquote>\n<p style=\"text-align: left;\"><em><\/em>\u00a0 &lt;?php the_content(__(&#8216;Read more&#8217;, &#8216;piano-black&#8217;)); ?&gt;&lt;?php edit_post_link(__(&#8216;EDIT&#8217;, &#8216;piano-black&#8217;), &#8216;&lt;li&gt;&#8217;, &#8216;&lt;\/li&gt;&#8217; ); ?<\/p>\n<p style=\"text-align: left;\">&lt;a id=&#8221;idoghome&#8221; title=&#8221;back to techs11&#8243; href=&#8221;&lt;?php echo home_url(); ?&gt;&#8221;&gt;&lt;\/a&gt;<br \/>\n&lt;div&gt;&lt;?php wp_link_pages(); ?&gt;&lt;\/div&gt;<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"homebutton codes in single.php or page.php\" href=\"\/media\/wpweb\/css\/homebuttoncodes.jpg\" rel=\"lightbox[homebutton]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"homebutton codes in single.php or page.php\" src=\"\/media\/wpweb\/css\/tn_homebuttoncodes.jpg\" alt=\"\" width=\"250\" height=\"25\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>The result will look like this<\/em><\/p>\n<p style=\"text-align: center;\"><a class=\"preview\" title=\"home button image and link\" href=\"\/media\/wpweb\/css\/homebutton.jpg\" rel=\"lightbox[homebutton]\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"home button image and link\" src=\"\/media\/wpweb\/css\/tn_homebutton.jpg\" alt=\"\" width=\"250\" height=\"42\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><strong><em>USING MOBIL PLUGIN WEBSITE<\/em><\/strong><\/p>\n<p style=\"text-align: center;\"><strong><em><\/em><\/strong><em>If we&#8217;re using WP Mobile Pack plugin and we want to place this button at the end of the post, we need to add to &#8220;mobile_pack_base\/style_structure.css&#8221; and &#8220;mobile_pack_base\/index.php&#8221;<\/em><\/p>\n<blockquote>\n<p style=\"text-align: left;\">#idoghome { font-size:14px; text-align:center;background:url(img\/home_48_hover.png) no-repeat right top; height:50px; padding:25px 0 0 55px; }<br \/>\n#idoghome:hover { background:url(img\/home_50.png) no-repeat right top;}<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\"><em><\/em><a class=\"preview\" rel=\"lightbox[homebutton]\" title=\"add button id to style_structure.css\" href=\"\/media\/wpweb\/css\/homebuttonbasecss.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"add button id to style_structure.css\" src=\"\/media\/wpweb\/css\/tn_homebuttonbasecss.jpg\" alt=\"\" width=\"250\" height=\"63\" \/><\/a><\/p>\n<blockquote>\n<p style=\"text-align: left;\">&lt;p style=&#8221;text-align:center;&#8221;&gt;&lt;a id=&#8221;idoghome&#8221; title=&#8221;back to techs11&#8243; href=&#8221;&lt;?php echo home_url(); ?&gt;&#8221;&gt;&lt;\/a&gt;&lt;\/p&gt;<br \/>\n&lt;\/div&gt;<br \/>\n&lt;?php get_sidebar(); ?&gt;<\/p>\n<\/blockquote>\n<p style=\"text-align: center;\"><a class=\"preview\" rel=\"lightbox[homebutton]\" title=\"add button to index.php\" href=\"\/media\/wpweb\/css\/homebuttonbaseindex.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"add button to index.php\" src=\"\/media\/wpweb\/css\/tn_homebuttonbaseindex.jpg\" alt=\"\" width=\"250\" height=\"32\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>This is how mobile page looks like<\/em><\/p>\n<p style=\"text-align: center;\"><em><\/em><a class=\"preview\" rel=\"lightbox[homebutton]\" title=\"final look of mobile page\" href=\"\/media\/wpweb\/css\/homebuttonmobile.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"final look in mobile display\" src=\"\/media\/wpweb\/css\/tn_homebuttonmobile.jpg\" alt=\"\" width=\"250\" height=\"65\" \/><\/a><\/p>\n<p style=\"text-align: center;\"><em>Cheers,<\/em><\/p>\n<ul class=\"lcp_catlist\" id=\"lcp_instance_0\"><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I think it&#8217;s a good practice to have a home link button at the end of every page for readers to get back to the main page. Create a graphic button or download the free icon on the net: 1 for main and 1 for hover. If there is only 1 image, just use Paint.net <a href=\"https:\/\/www.dognmonkey.com\/techs\/create-a-home-button-in-wordpress.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":[26,20],"tags":[51,88,185],"class_list":["post-2252","post","type-post","status-publish","format-standard","hentry","category-themes","category-wordpress","tag-css","tag-home-button-link","tag-themes-2"],"views":2354,"_links":{"self":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/2252","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=2252"}],"version-history":[{"count":0,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/posts\/2252\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/media?parent=2252"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/categories?post=2252"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dognmonkey.com\/techs\/wp-json\/wp\/v2\/tags?post=2252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}