{"id":22017,"date":"2016-05-18T03:01:47","date_gmt":"2016-05-17T17:01:47","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=22017"},"modified":"2016-05-21T07:01:19","modified_gmt":"2016-05-20T21:01:19","slug":"wordpress-show-html-tags-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-show-html-tags-primer-tutorial\/","title":{"rendered":"WordPress Show HTML Tags Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a title='Show Tags of This Webpage into a New Window' href=\"#\" onclick=\" window.open((document.URL.replace('#main','') + '&#038;showtags=Y').replace('?','?showtags=y&#038;').replace('\/&#038;', '\/?').replace('.php&#038;', '.php?'), '_blank', 'top=20,left=20,width=600,height=600'); \"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"WordPress Show HTML Tags Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/showtags.jpeg\" title=\"WordPress Show HTML Tags Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">WordPress Show HTML Tags Primer Tutorial<\/p><\/div>\n<p>We&#8217;ve got one new concept and one concept revisited today with our work on some WordPress Blog functionality to allow users to show the HTML coding behind <i>some<\/i> of the HTML elements of the RJM Programming Blog webpage of interest.  Say <i>some<\/i> because not all HTML elements lend themselves to allowing the functionality we&#8217;ve used to display the HTML involved.  It is really only those HTML elements where their [element].innerHTML components can be <i>displayable<\/i> text that will show the HTML coding for today&#8217;s new functionality &#8230; even so, we think this could be a useful learning tool for users wanting to get ideas of what HTML elements go to make up what webpage <i>look<\/i>.<\/p>\n<p>So today&#8217;s new concept, at least in relation to this blog&#8217;s postings from the past, is that it hadn&#8217;t occurred to us until today that the &#8230;<\/p>\n<ol>\n<li>WordPress TwentyTen theme&#8217;s top menu is constructed in such a way as to allow you to put &#8220;intelligence&#8221; into the &#8220;Add Page&#8221; Title that you enter &#8230; in other words you can include into the &#8220;Add Page&#8221; Title an HTML <i>a<\/i> tag, for example, that performs Javascript there and then on the webpage you are currently on, rather than navigating to a new &#8220;Add Page&#8221; menu page &#8230; which is of great interest to us with today&#8217;s work, because the user is likely to be reading a webpage of interest, now, that they want to see the internal HTML coding for, compared for them, in a new popup (window.open()) webpage, rather than seeing this for the &#8220;Add Page&#8221; menu webpage (we consider less interesting, but we&#8217;ll still allow in as your functionality usage choice)<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/showtags.jpg\" title=\"Add Page view of this\"><\/img><br \/>\n &#8230; and, as we&#8217;ve talked about before, last, at this blog with &#8230;<\/li>\n<li><a target=_blank title='WordPress Bullet Point CSS Styling Emoji Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-bullet-point-css-styling-emoji-tutorial\/'>WordPress Bullet Point CSS Styling Emoji Tutorial<\/a> reminded us of the fabulous CSS functionality involving <a target=_blank title='CSS :before selector information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/sel_before.asp'>:before<\/a> and <a target=_blank title='CSS :after selector information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/sel_after.asp'>:after<\/a> (selectors) and <a target=_blank title='CSS content: property information from w3schools' href='http:\/\/www.w3schools.com\/cssref\/pr_gen_content.asp'>content:<\/a> (property) usage, which we put to use here &#8230; those of you into editing XML and using <a target=_blank title='Epic XML Editor' href='http:\/\/www.stylusstudio.com\/download-xml-editor.html?gclid=Cj0KEQjw3-W5BRCymr_7r7SFt8cBEiQAsLtM8tIeW4lppmrRVFBbHw4xkLiJakfNZ063i4vyKNvyxuAaAiCb8P8HAQ'>Epic<\/a> may be &#8220;right at home&#8221; with these ideas &#8230; though what we do here with HTML is nothing as involved as Epic does for XML &#8230; we&#8217;re just into presenting a readonly guide, for curiosity&#8217;s sake<\/li>\n<\/ol>\n<p>So what needed to change in good ol&#8217; (TwentyTen theme&#8217;s) header.php to do this <b>pretty simple change<\/b> &#8230;<\/p>\n<p><code><br \/>\n&lt;\/script&gt;<br \/>\n<b>&lt;?php<br \/>\n  if (isset($_GET['showtags'])) {<br \/>\n    echo \"&lt;link href='\/\/www.rjmprogramming.com.au\/HTMLCSS\/<a target=_blank title='showtags.css' href='http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/showtags.css_GETME'>showtags.css<\/a>' rel='stylesheet' type='text\/css'&gt;\";<br \/>\n  }<br \/>\n?&gt;<\/b><br \/>\n&lt;\/head&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; just asking for the address bar URL to contain a (PHP $_GET[&#8216;showtag&#8217;]) <i>showtag=<\/i> part to the webpage call.  It&#8217;s not the science of green leaved <a target=_blank title='?' href='https:\/\/www.google.com.au\/search?q=rocket+salad+piquancy&#038;biw=1067&#038;bih=528&#038;source=lnms&#038;tbm=isch&#038;sa=X&#038;ved=0ahUKEwjM7vLYj-DMAhUoiKYKHa_yChIQ_AUIBigB'>piquancy<\/a> exactly.<\/p>\n<p>And so if you want to see what we have here with extra HTML tagging shown, in a new popup window, try this <a title='Show Tags of This Webpage into a New Window' href=\"#\" onclick=\" window.open((document.URL.replace('#main','') + '&#038;showtags=Y').replace('?','?showtags=y&#038;').replace('\/&#038;', '\/?').replace('.php&#038;', '.php?'), '_blank', 'top=20,left=20,width=600,height=600'); \">live run<\/a> link, and &#8220;chow for now&#8221;.<\/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='#d22017' onclick='var dv=document.getElementById(\"d22017\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/wordpress\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22017' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;ve got one new concept and one concept revisited today with our work on some WordPress Blog functionality to allow users to show the HTML coding behind some of the HTML elements of the RJM Programming Blog webpage of interest. &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-show-html-tags-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":[151,257,281,576,770,932,997,1319,1324,1325,1456],"class_list":["post-22017","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-blog","tag-content","tag-css","tag-html","tag-menu","tag-php","tag-programming","tag-tutorial","tag-twentyten","tag-twentyten-theme","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22017"}],"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=22017"}],"version-history":[{"count":9,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22017\/revisions"}],"predecessor-version":[{"id":22095,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22017\/revisions\/22095"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=22017"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=22017"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=22017"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}