{"id":50515,"date":"2020-10-09T03:01:04","date_gmt":"2020-10-08T17:01:04","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=50515"},"modified":"2020-10-08T18:36:56","modified_gmt":"2020-10-08T08:36:56","slug":"landing-page-wordpress-tags-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-wordpress-tags-primer-tutorial\/","title":{"rendered":"Landing Page WordPress Tags Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/index.htm\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Landing Page WordPress Tags Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/lpwptags.jpg\" title=\"Landing Page WordPress Tags Primer Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">Landing Page WordPress Tags Primer Tutorial<\/p><\/div>\n<p>We&#8217;re hooking into our crontab\/curl PHP overnight arrangements regarding Recent Posts to add in &#8230;<\/p>\n<ul>\n<li>a once a day creation of a web server &#8220;tag cloud&#8221; HTML file &#8230; derived via &#8230;<\/li>\n<li>WordPress blog widget &#8220;Tags&#8221; content<\/li>\n<\/ul>\n<p> &#8230; that creates on the RJM Programming &#8220;Landing Page&#8221; a toggling arrangement between &#8230;<\/p>\n<ul>\n<li>this new &#8220;tag cloud&#8221; content in an iframe &#8220;onload&#8221; event populating of a global var<font size=1>iable<\/font> divtc &#8230; within the Landing Page Javascript &#8230;<br \/>\n<code><br \/>\n  var divtc='';<br \/>\n<br \/>\nfunction anticheckd(iois) {<br \/>\n  document.getElementById('divtagcloud').innerHTML='';<br \/>\n}<br \/>\n<br \/>\nfunction checkd(iois) {<br \/>\n  if (iois != null) {<br \/>\n    var aconto = (iois.contentWindow || iois.contentDocument);<br \/>\n    if (aconto != null) {<br \/>\n     if (aconto.document) { aconto = aconto.document; }<br \/>\n     if (aconto.body != null) {<br \/>\n        divtc=aconto.body.innerHTML;<br \/>\n        if (divtc.indexOf(' class=\"tagcloud\"') != -1) {<br \/>\n          setTimeout(divtctoggler, 8000);<br \/>\n        } else {<br \/>\n          document.getElementById('divtagcloud').innerHTML='';<br \/>\n        }<br \/>\n     }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<br \/>\nfunction divtctoggler() {<br \/>\n  if (divtc != '') {<br \/>\n   if (document.getElementById('divtagcloud').innerHTML == '' || document.getElementById('divtagcloud').innerHTML.indexOf('&lt;iframe ') != -1) {<br \/>\n     document.getElementById('topi').style.display='none';<br \/>\n     document.getElementById('divtagcloud').style.transformOrigin=\"30% 10%\"; \/\/zoom=\"0.75\";<br \/>\n     document.getElementById('divtagcloud').style.transform=\"scale(0.5)\"; \/\/zoom=\"0.75\";<br \/>\n     document.getElementById('divtagcloud').innerHTML=divtc;<br \/>\n   } else {<br \/>\n     document.getElementById('divtagcloud').innerHTML='';<br \/>\n     document.getElementById('topi').style.display='block';<br \/>\n   }<br \/>\n   setTimeout(divtctoggler, 15000);<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n &#8230; supporting the new HTML &#8230;<br \/>\n<code><br \/>\n&lt;div id=divtagcloud&gt;&lt;iframe style='display:none;' onerror='anticheckd(this);' onload='checkd(this);' src='\/\/www.rjmprogramming.com.au\/PHP\/divtagcloud.html'&gt;&lt;\/iframe&gt;&lt;\/div&gt;<br \/>\n<\/code><br \/>\n &#8230; with &#8230;<\/li>\n<li>existing Google Chart Pie Chart example of use<\/li>\n<\/ul>\n<p> &#8230; in its &#8220;div widget&#8221; within the Landing Page HTML.  As far as the crontab\/curl PHP goes <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php--------GETME'>the changed<\/a> <a target=_blank href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php--------GETME'>recent-posts-2.php<\/a> does its job of populating &#8230;<\/p>\n<p><iframe style='width:100%;height:200px;' src='http:\/\/www.rjmprogramming.com.au\/PHP\/divtagcloud.html'><\/iframe><\/p>\n<p> &#8230; via &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n   $classtagcloud=file_get_contents(\"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=14234\");<br \/>\n   $classtags=explode('&lt;div class=\"tagcloud\"', str_replace(\"http:\",\"\",str_replace(\"https:\",\"\",$classtagcloud)));<br \/>\n   if (sizeof($classtags) &gt; 1) {<br \/>\n     file_put_contents(dirname(__FILE__) . '\/divtagcloud.html', str_replace('&lt;a ','&lt;a target=_blank ','&lt;html&gt;&lt;body&gt;&lt;div class=\"tagcloud\"' . explode('&lt;\/div&gt;', $classtags[1])[0] . '&lt;\/div&gt;&lt;\/body&gt;&lt;\/html&gt;'));<br \/>\n   }<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p><!--p>You can also see this play out at WordPress 4.1.1's <a target=_blank  href='\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-wordpress-tags-primer-tutorial\/'>Landing Page WordPress Tags Primer 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='#d50515' onclick='var dv=document.getElementById(\"d50515\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/landing-page\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d50515' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We&#8217;re hooking into our crontab\/curl PHP overnight arrangements regarding Recent Posts to add in &#8230; a once a day creation of a web server &#8220;tag cloud&#8221; HTML file &#8230; derived via &#8230; WordPress blog widget &#8220;Tags&#8221; content &#8230; that creates &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-wordpress-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,3443,284,3445,576,652,680,932,997,1031,1240,3444,1319,1411,1428,1456],"class_list":["post-50515","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-blog","tag-crointab","tag-curl","tag-daily","tag-html","tag-javascript","tag-landing-page","tag-php","tag-programming","tag-recent-posts","tag-tag","tag-tag-cloud","tag-tutorial","tag-web-server","tag-widget","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/50515"}],"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=50515"}],"version-history":[{"count":6,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/50515\/revisions"}],"predecessor-version":[{"id":50521,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/50515\/revisions\/50521"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=50515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=50515"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=50515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}