{"id":12908,"date":"2015-03-19T05:02:06","date_gmt":"2015-03-18T18:02:06","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=12908"},"modified":"2015-03-19T05:02:06","modified_gmt":"2015-03-18T18:02:06","slug":"wordpress-blog-landing-page-toggler-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-landing-page-toggler-primer-tutorial\/","title":{"rendered":"WordPress Blog Landing Page Toggler Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/post_316.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Wordpress Blog Landing Page Toggler Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/post_316.jpg\" title=\"Wordpress Blog Landing Page Toggler Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Wordpress Blog Landing Page Toggler Primer Tutorial<\/p><\/div>\n<p>With your WordPress Blog design, at least for the Twenty Ten theme we use at this blog, in the code you can differentiate between a <a target=_blank title='Landing page information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Landing_page'>&#8220;Landing Page&#8221;<\/a> type of call and other types of calls, to specific posts or tags or categories or searches or administrative calls, by the existence of <a target=_blank title='Query string information from Wikipedia ... thansk' href='http:\/\/en.wikipedia.org\/wiki\/Query_string'>&#8220;get&#8221;<\/a> parameters so that &#8230;<\/p>\n<ul>\n<li>in PHP (eg. header.php) you can check <br \/>\n<code>if (strlen($_SERVER['QUERY_STRING']) > 0) {  echo \"Not on Landing Page\"; } else { echo \"On Landing Page\"; }<\/code><\/li>\n<li>in HTML\/Javascript (eg. still the logic in header.php) you can (Javascript DOM) check <br \/>\n<code>if (document.URL.indexOf(\"?\") != -1) {  alert(\"Not on Landing Page\"); } else { alert(\"On Landing Page\"); }<\/code><\/li>\n<\/ul>\n<p>&#8230; and it just so happens with our blog, we have a <a target=_blank title='Sticky content information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Sticky_content'>&#8220;Sticky&#8221;<\/a> posting (above the fold) for the &#8220;Landing Page&#8221; scenario, so we don&#8217;t have to make the changes in header.php this time (but rather use the CMS HTML code of the blog posting to make the changes needed today) &#8230; and it just so happens you can add Javascript logic to an individual posting &#8230; and it just so happens we&#8217;ve discussed this as well at <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7092' title='Javascript in Your WordPress Post Primer Tutorial'>Javascript in Your WordPress Post Primer Tutorial<\/a> should you be curious.<\/p>\n<p>And so what?  What&#8217;s the point?   Well, the personal point is, that we would like, for the &#8220;Landing Page&#8221; scenario only (because if they come another way they probably already know), to inform the user, maybe not straight away, but soon, that they have landed at an I.T. blog, because it may be their first visit, and you have to look around to find this out for sure (&#8220;in the old days&#8221;) &#8230; actually don&#8217;t mind the idea of users taking time to find something out, but not if it means you score a <a target=_blank title='Bounce rate information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Bounce_rate'>&#8220;bounce&#8221;<\/a> (ie. the user immediately leaves your website).<\/p>\n<p>There is a small danger of annoyance with the dynamic scenario, for some users, but tend to think this resistance to dynamically changing websites represent users who probably will not like this blog much anyway.<\/p>\n<p>So you can see the &#8220;Landing Page&#8221; blog posting HTML (in isolation) as <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/post_316.html-GETME\" title='post_316.html-GETME'>post_316.html<\/a> which changed as per <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/wordpress\/post_316.html-GETME\" title='post_316.html-GETME'>post_316.html<\/a>.<\/p>\n<p>Hope you enjoy today&#8217;s WordPress specific <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/wordpress\/post_316.jpg\" title='Click picture'>tutorial<\/a>.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d12156' onclick='var dv=document.getElementById(\"d12156\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d12156' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>With your WordPress Blog design, at least for the Twenty Ten theme we use at this blog, in the code you can differentiate between a &#8220;Landing Page&#8221; type of call and other types of calls, to specific posts or tags &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-landing-page-toggler-primer-tutorial\/\">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":{"footnotes":""},"categories":[12,37],"tags":[51,151,216,354,449,576,652,680,890,932,972,1019,1198,1319,1345,1456],"class_list":["post-12908","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-above-the-fold","tag-blog","tag-cms","tag-dom","tag-fold","tag-html","tag-javascript","tag-landing-page","tag-orogramming","tag-php","tag-posting","tag-query-string","tag-sticky","tag-tutorial","tag-url","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12908"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=12908"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12908\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=12908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=12908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=12908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}