{"id":68419,"date":"2025-05-23T03:01:00","date_gmt":"2025-05-22T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=68419"},"modified":"2025-05-22T18:50:56","modified_gmt":"2025-05-22T08:50:56","slug":"wordpress-recent-posts-korn-shell-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-korn-shell-tutorial\/","title":{"rendered":"WordPress Recent Posts Korn Shell Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_yet_again.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Korn Shell Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_again.gif\" title=\"WordPress Recent Posts Korn Shell Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Korn Shell Tutorial<\/p><\/div>\n<p>Today we&#8217;re rearranging how our <a target=\"_blank\" title='WordPress.org ... your hosting' href='http:\/\/www.wordpress.org' rel=\"noopener\">WordPress<\/a>.org blog Recent Posts widget images are created via <a target=\"_blank\" title='crontab information from computerhope ... thanks' href='http:\/\/www.computerhope.com\/jargon\/c\/cron.htm' rel=\"noopener\">crontab<\/a> and <a target=\"_blank\" title='Linux or unix curl information from computerhope' href='http:\/\/www.computerhope.com\/unix\/curl.htm' rel=\"noopener\">curl<\/a> in a scheduled way on this newer Apache\/PHP\/MySql Linux web server, as we talked about with <a title='WordPress Recent Posts Navigation Issue Tutorial' href='#wprpnit'>WordPress Recent Posts Navigation Issue Tutorial<\/a> too.<\/p>\n<p>For a reason still unclear to us the recent-posts-2.php <a target=\"_blank\" title='PHP exec() method information' href='http:\/\/php.net\/manual\/en\/function.exec.php' rel=\"noopener\">exec<\/a> call of <a target=\"_blank\" title='ImageMagick' href='http:\/\/www.imagemagick.org' rel=\"noopener\">ImageMagick<\/a> convert creation of thumbnails failed, after a failure creating zero length non-thumbnail images (fixed now using PHP <a target=\"_blank\" href='http:\/\/www.w3schools.com\/php\/func_filesystem_copy.asp' title='PHP copy' rel=\"noopener\">copy<\/a> rather than <a target=\"_blank\" title='PHP file_put_contents' href='http:\/\/php.net\/manual\/en\/function.file-put-contents.php' rel=\"noopener\">file_put_contents<\/a>), though it works on the command line in a Linux environment with that same priviledged username.<\/p>\n<p>Especially given that thumbnail usage is optional in the WordPress Recent Posts functionality, rather than spend more time<sup> unhappy<\/sup>, we&#8217;re happy if a beginning to <a target=\"_blank\" title='Korn Shell' href='https:\/\/en.wikipedia.org\/wiki\/KornShell' rel=\"noopener\">Korn Shell<\/a> (which the PHP now writes in a way so that the execution of the Korn Shell causes <a target=\"_blank\" title='?' href='https:\/\/www.youtube.com\/watch?v=0TiqXFssKMY' rel=\"noopener\">it&#8217;s self destruction<\/a>) involvement &#8230;<\/p>\n<p><img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/recent_posts_yet_again.gif\"><\/img><\/p>\n<p> &#8230; within the crontab purview.<\/p>\n<p>Hopefully we&#8217;ll have good news tomorrow that it worked as a new approach.<\/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\/wordpress-recent-posts-korn-shell-tutorial\/' rel=\"noopener\">New WordPress Recent Posts Korn Shell Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wprpnit'>Previous relevant <a target=\"_blank\" title='WordPress Recent Posts Navigation Issue Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-navigation-issue-tutorial\/' rel=\"noopener\">WordPress Recent Posts Navigation Issue Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Navigation Issue Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" title=\"WordPress Recent Posts Navigation Issue Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Navigation Issue Tutorial<\/p><\/div>\n<p>Back to the topic of &#8220;WordPress Blog Recent Posts&#8221; (and its relationship to the RJM Programming Landing Page) last referenced at <a title='WordPress Recent Posts Widget Caching Issues Tutorial' href='#wprpwcit'>WordPress Recent Posts Widget Caching Issues Tutorial<\/a>, is today&#8217;s fix to an iPhone usage hashtag navigational annoyance that would leave the Blog Title lose a bit of its visibility up the top when navigated to via the RJM Programming <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\" title=\"RJM Programming Landing Page\" rel=\"noopener\">Landing Page<\/a> top left &#8220;Recent Posts&#8221; thumbnail images.<\/p>\n<p>The fix saw us add to the existant &#8220;#post-&#8221; prefixed hashtag navigation with our &#8220;#andabit=-70&#8221; &#8220;double hashtagging&#8221; as mentioned in <a target=\"_blank\" href='https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-blog-hashtag-navigation-return-onmouseover-tutorial\/' title='WordPress Blog Hashtag Navigation Return Onmouseover Tutorial' rel=\"noopener\">WordPress Blog Hashtag Navigation Return Onmouseover Tutorial<\/a>.  It took us a while to track down where to intervene to achieve this, and we eventually cottoned onto the way that if that RJM Programming Landing Page top left &#8220;Recent Posts&#8221; iframe container (ie. <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" title=\"RJM Programming Landing Page zero.html iframe\" rel=\"noopener\"><b>zero.html<\/b><\/a>) of those thumbnail images could involve URLs suffixed by &#8220;#andabit=-70&#8221; we would <font color=blue>rid the hashtag navigation of that annoyance<\/font> &#8230;<\/p>\n<p>&lt;?php<br \/>\n<code><br \/>\n    file_put_contents(dirname(__FILE__) . \"\/<b>zero.html<\/b>\",<br \/>\n      <font color=blue>str_replace(\" href='\", ' href=\"',<br \/>\n      str_replace(\"#andabit=-7x' title='\",\"#andabit=-70' title='\",<br \/>\n      str_replace(\"0' title='\",\"0#andabit=-7x' title='\",<br \/>\n      str_replace(\"1' title='\",\"1#andabit=-7x' title='\",<br \/>\n      str_replace(\"2' title='\",\"2#andabit=-7x' title='\",<br \/>\n      str_replace(\"3' title='\",\"3#andabit=-7x' title='\",<br \/>\n      str_replace(\"4' title='\",\"4#andabit=-7x' title='\",<br \/>\n      str_replace(\"5' title='\",\"5#andabit=-7x' title='\",<br \/>\n      str_replace(\"6' title='\",\"6#andabit=-7x' title='\",<br \/>\n      str_replace(\"7' title='\",\"7#andabit=-7x' title='\",<br \/>\n      str_replace(\"8' title='\",\"8#andabit=-7x' title='\",<br \/>\n      str_replace(\"9' title='\",\"9#andabit=-7x' title='\",<\/font>    str_replace(\"\/wordpress\/\", \"\/ITblog\/\", $htmlis))<br \/>\n      <font color=blue>))))))))))))<\/font>;<br \/>\n<\/code><br \/>\n?&gt;<\/p>\n<p> &#8230; reflected by <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' rel=\"noopener\">a changed<\/a> <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php----------GETME' rel=\"noopener\">recent-posts-2.php<\/a> WordPress &#8220;Recent Posts&#8221; PHP processing codeset.<\/p>\n<p>Then that &#8220;#andabit=-70&#8221; propagates through to a &#8220;double hashtagging&#8221; scenario you can see with today&#8217;s <a target=\"_blank\" href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/fix_a_hashtag_navigation_annoyance_with_wordpress_blog.gif\" title=\"Click picture\" rel=\"noopener\">tutorial picture<\/a>.<\/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\/wordpress-recent-posts-navigation-issue-tutorial\/' rel=\"noopener\">WordPress Recent Posts Navigation Issue Tutorial<\/a>.<\/p-->\n<hr>\n<p id='wprpwcit'>Previous relevant <a target=\"_blank\" title='WordPress Recent Posts Widget Caching Issues Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-widget-caching-issues-tutorial\/' rel=\"noopener\">WordPress Recent Posts Widget Caching Issues Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"WordPress Recent Posts Widget Caching Issues Tutorial\" src=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/rpzero.gif\" title=\"WordPress Recent Posts Widget Caching Issues Tutorial\"  style=\"float:left;\" \/><\/a><p class=\"wp-caption-text\">WordPress Recent Posts Widget Caching Issues Tutorial<\/p><\/div>\n<p>The WordPress blog you are reading, with the TwentyTen theme, has a useful &#8220;widget&#8221; (contained unit of functionality on the webpage that WordPress knows about) called &#8220;Recent Posts&#8221;, which we&#8217;ve had a lot of fun over the years, working with, but &#8220;working against&#8221;, a tad <font size=1>(because the issue is <a target=\"_blank\" title='?!' href='https:\/\/www.youtube.com\/watch?v=wlMuBSkVuzE' rel=\"noopener\">not exactly mission critical<\/a>, and)<\/font> if you are not careful, are the combination of &#8230;<\/p>\n<ul>\n<li>the content needed to be up to date at all times would need to counter the once a day crontab\/curl arrangements (that WordPress does not know about) for the new posting each day &#8230; versus &#8230;<\/li>\n<li>the caching of the web browser used can circumvent the up to date correspondence of &#8230;\n<ol>\n<li>&#8220;a&#8221; link nesting &#8230; of &#8230;<\/li>\n<li>&#8220;img&#8221; blog posting thumbnail<\/li>\n<\/ol>\n<\/li>\n<\/ul>\n<p> &#8230; in two scenarios that we have discovered &#8230;<\/p>\n<ol>\n<li>you arrive back at a blog posting webpage after a crontab\/curl sequence has happened &#8230; the caching causes the &#8220;img&#8221; and &#8220;a&#8221; not to correspond, at least on that first such occasion, sometimes &#8230;<\/li>\n<li>you arrive off the <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/\" title=\"Landing Page\" rel=\"noopener\">Landing Page<\/a> (after a crontab\/curl sequence has happened) and up the top left you click on a blog posting that isn&#8217;t the latest, and you visited the day before, the caching from that day before causes the &#8220;img&#8221; and &#8220;a&#8221; not to correspond, at least on that first such occasion, sometimes<\/li>\n<\/ol>\n<p>Today&#8217;s <a target=\"_blank\" title='Tutorial picture' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/rpzero.gif' rel=\"noopener\">animated GIF<\/a> presentation represents a warts and all (occasionally mistaking a Javascript issue for a CSS one) showing of the troubleshooting and investigation of such caching WordPress Recent Posts issues.<\/p>\n<p>Central to the solutions are the idea that the crontab\/curl work leaves behind a <a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/zero.html\" title=\"Click picture\" rel=\"noopener\">zero.html<\/a> &#8220;report webpage&#8221; we can effectively test the caching against as like a &#8220;sanity test&#8221; &#8230; like.  As &#8220;caching&#8221; is a &#8220;client&#8221; th<strike>a<\/strike>ing whereas the PHP of the TwentyTen theme code &#8220;header.php&#8221; happens is taking place at the &#8220;server&#8221; end of th<strike>a<\/strike>ings, what can be the &#8220;conduit&#8221; between these two woooooorrrrrrllllllldddds &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\n&lt;iframe onload='rptds(this);' style='display:none;' src='\/\/www.rjmprogramming.com.au\/PHP\/zero.html&lt;?php echo \"?rand=\" . rand(0,198765432); ?&gt;'&gt;&lt;\/iframe&gt;<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; placed immediately after the &#8220;body&#8221; element definition.  That Javascript &#8220;onload&#8221; event logic sets up some <font color=blue>global arrays<\/font> we&#8217;ll use later &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nvar nothanks=false, findthing=\"\"<font color=blue>, rptdlist=[], rptdhref=[], rptdtitle=[]<\/font>;<br \/>\n<br \/>\nfunction rptds(iois) {<br \/>\n  var thistdis='';<br \/>\n  if (iois != null) {<br \/>\n       var xaaconto = (iois.contentWindow || iois.contentDocument);<br \/>\n       if (xaaconto != null) {<br \/>\n       if (xaaconto.document) { xaaconto = xaaconto.document; }<br \/>\n       if (xaaconto.body != null) {<br \/>\n         var ltds=xaaconto.body.innerHTML.split('&lt;td');<br \/>\n         for (var iltds=1; iltds&lt;ltds.length; iltds++) {<br \/>\n           thistdis='&lt;td' + ltds[iltds].split('&lt;\/td&gt;')[0] + '&lt;\/td&gt;';<br \/>\n           rptdlist.push(thistdis);<br \/>\n           if (thistdis.indexOf(' href=\"') != -1) {<br \/>\n            rptdhref.push(thistdis.split(' href=\"')[1].split('\"')[0]);<br \/>\n           }<br \/>\n           if (thistdis.indexOf(' title=\"') != -1) {<br \/>\n            rptdtitle.push(thistdis.split(' title=\"')[1].split('\"')[0]);<br \/>\n           }<br \/>\n         }<br \/>\n       }<br \/>\n       }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; so that <font color=blue>changed code<\/font> in Javascript &#8220;function rptwo&#8221; as below &#8230;<\/p>\n<p>&lt;?php echo &#8221;<br \/>\n<code><br \/>\nfunction rptwo() {<br \/>\n  var tworp=document.getElementById('recent-posts-2');<br \/>\n  if (tworp != null) {<br \/>\n    if (tworp.innerHTML.indexOf('&lt;u' + 'l&gt;') != -1) {<br \/>\n      var ihs=tworp.innerHTML.split(\"&lt;\/a&gt;\");<br \/>\n      tworp.innerHTML = tworp.innerHTML.replace('&lt;u' + 'l&gt;', '&lt;u' + 'l class=\"iconlist\"&gt;').replace(\/a href\/g,'a style=\"border:1px solid rgba(0,127,0,0.6);background: rgba(0,255,0,0.6); background: -webkit-linear-gradient(left top, rgba(0,255,0,0.6), rgba(255,255,0,0.6)); background: -o-linear-gradient(bottom right, rgba(0,255,0,0.5), rgba(255,255,0,0.6)); background: -moz-linear-gradient(bottom right, rgba(0,255,0,0.6), rgba(255,255,0,0.6)); background: linear-gradient(to bottom right, rgba(0,255,0,0.6), rgba(255,255,0,0.6));\" title=\"Go to tutorial\" onclick=\"if (1 == 2) { findthing=' + \"''\" + '; } nothanks=true;\" href');<br \/>\n      var eight=new Array(\"one\", \"two\", \"three\", \"four\", \"five\", \"six\", \"seven\", \"eight\");<br \/>\n      var ieight;<br \/>\n      tworp.innerHTML = tworp.innerHTML.replace(\/&lt;\\\/a&gt;\/g, \"&lt;\/a&gt;&lt;img class='iiconlist' src='\/\/www.rjmprogramming.com.au\/wordpress\/transparent.png' style='z-index:3;margin-left:0px;margin-top:0px;opacity:0.2;width:140px;height:100px;box-shadow:rgba(0,0,255,0.2) 2px 2px 2px 2px inset;' onmouseover='getRpnow();' onmouseout='yehBut();' ontouchstart='getRpnow();' ontouchend='yehBut();' title=' ... welcome to the long hover functionality that shows Blog Post regarding Recent Post images'&gt;\");<br \/>\n      for (ieight=0; ieight&lt;eight.length; ieight++) {<br \/>\n        if (ihs.length &gt; eval(0 + ieight)) {<br \/>\n        <font color=blue>if (rptdtitle.length &gt; ieight) {<br \/>\n        if (ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] != rptdtitle[ieight]) {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(ihs[eval(0 + ieight)], ihs[eval(0 + ieight)].replace(' href=', ' href=\"' + rptdhref[ieight].replace('?p=', '?rx=' + Math.floor(Math.random() * 198765434) + '&p=') + '\" data-href=').replace('&gt;' + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + '&lt;', '&gt;' + rptdtitle[ieight] + '&lt;'));<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + rptdtitle[ieight] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        } else {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        }<br \/>\n        } else {<\/font><br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li title='Cut to the Chase' onclick=' findthing=\\\"\" + ihs[eval(0 + ieight)].split(\"&gt;\")[eval(-1 + ihs[eval(0 + ieight)].split(\"&gt;\").length)] + \"\\\"; setTimeout(rplater,1000); nothanks=false; ' class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        <font color=blue>}<\/font><br \/>\n        } else {<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;li&gt;\", \"&lt;li class='\" + eight[ieight] + \"'&gt;\");<br \/>\n        }<br \/>\n        \/\/tworp.innerHTML = tworp.innerHTML.replace(\"&lt;img class=\", \"&lt;img onclick='clickaid(\\\"a\" + eight[ieight] + \"\\\");' class=\").replace(\"&lt;img title=\\\" \", \"&lt;img onclick=\\\"clickaid('a\" + eight[ieight] + \"');\\\" title=\\\"\");<br \/>\n        tworp.innerHTML = tworp.innerHTML.replace(\"&lt;img class=\", \"&lt;img onclick=\\\"if (1 == 2) { findthing=''; } nothanks=true; clickaid('a\" + eight[ieight] + \"');\\\" class=\").replace(\"&lt;img title=\\\" \", \"&lt;img onclick=\\\"clickaid('a\" + eight[ieight] + \"');\\\" title=\\\"\");<br \/>\n      }<br \/>\n    }<br \/>\n  }<br \/>\n}<br \/>\n<\/code><br \/>\n&#8220;; ?&gt;<\/p>\n<p> &#8230; helps resolve the second issue&#8217;s mismatched data sources which caching may exacerbate.<\/p>\n<p>What about the first issue?  Well, we went down the route of thinking this was bound to be a Javascript scripting issue and went through the code with that in mind, until searching for &#8220;one.jp&#8221; <font size=1>(I think it was)<\/font> within &#8220;header.php&#8221; got us tweaked into realizing some of the CSS styling there was encouraging the cache to not let go of &#8220;img&#8221; &#8220;src&#8221; attributes.  As we are more and more fond of doing these days, even for image URLs, we add some &#8220;get&#8221; &#8220;?&#8221; and\/or &#8220;&#038;&#8221; arguments to cause the web browser to go back to the source (and so, around the &#8220;cache&#8221;) to get its data, as per &#8220;header.php&#8221;&#8216;s <font color=blue>(changed)<\/font> &#8230;<\/p>\n<p><code><br \/>\n&lt;style&gt;<br \/>\nli.one {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/one.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.two {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/two.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.three {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/three.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.four {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/four.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.five {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/five.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.six {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/six.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.seven {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/seven.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n<br \/>\nli.eight {<br \/>\nbackground-image: url('\/\/www.rjmprogramming.com.au\/PHP\/eight.jpg<font color=blue>&lt;?php echo \"?rnd=\" . rand(0,19876545); ?&gt;<\/font>');<br \/>\nbackground-position: left;<br \/>\nbackground-repeat: no-repeat;<br \/>\nbackground-size: 128px 80px;<br \/>\nheight: 150px;<br \/>\ntext-indent: 0px;<br \/>\n}<br \/>\n&lt;\/style&gt;<br \/>\n<\/code><\/p>\n<p>Continuing in that long line of WordPress <a href='#recent-posts-2' title='Recent Posts widget here'>Recent Posts<\/a> work you look over to your right (or down the bottom, for some mobile platforms) of the blog webpage for the relevant widget that has that relationship to the Landing Page as we last talked about with <a title='Landing Page WordPress Tags Primer Tutorial' href='#lpwptpt'>Landing Page WordPress Tags Primer Tutorial<\/a>.  There, you can see, we hope, more reliable correspondence of &#8220;a&#8221; to &#8220;img&#8221; data sources, in their rightful order, the catalyst for change being that once a day crontab\/curl &#8220;inhouse&#8221; publishing of one WordPress blog post.<\/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\/wordpress-recent-posts-widget-caching-issues-tutorial\/' rel=\"noopener\">WordPress Recent Posts Widget Caching Issues Tutorial<\/a>.<\/p-->\n<hr>\n<p id='lpwptpt'>Previous relevant <a target=\"_blank\" title='Landing Page WordPress Tags Primer Tutorial' href='\/\/www.rjmprogramming.com.au\/ITblog\/landing-page-wordpress-tags-primer-tutorial\/' rel=\"noopener\">Landing Page WordPress Tags Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/index.htm\" rel=\"noopener\"><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' rel=\"noopener\">the changed<\/a> <a target=\"_blank\" href='http:\/\/www.rjmprogramming.com.au\/PHP\/recent-posts-2.php--------GETME' rel=\"noopener\">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\/' rel=\"noopener\">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<hr>\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='#d51251' onclick='var dv=document.getElementById(\"d51251\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/cache\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d51251' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d55433' onclick='var dv=document.getElementById(\"d55433\"); 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='d55433' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\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='#d68419' onclick='var dv=document.getElementById(\"d68419\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/thumbnail\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d68419' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we&#8217;re rearranging how our WordPress.org blog Recent Posts widget images are created via crontab and curl in a scheduled way on this newer Apache\/PHP\/MySql Linux web server, as we talked about with WordPress Recent Posts Navigation Issue Tutorial too. &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/wordpress-recent-posts-korn-shell-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,29,37],"tags":[4855,85,151,234,2650,265,272,274,284,405,430,4387,590,1658,677,707,885,2999,932,997,5189,1031,1893,4228,1273,1319,1428,1456],"class_list":["post-68419","post","type-post","status-publish","format-standard","hentry","category-elearning","category-operating-system","category-tutorials","tag-almalinux","tag-apache","tag-blog","tag-command-line","tag-convert","tag-copy","tag-cron","tag-crontab","tag-curl","tag-exec","tag-file_put_contents","tag-functionality","tag-image","tag-imagemagick","tag-korn-shell","tag-linux","tag-operating-system-2","tag-optional","tag-php","tag-programming","tag-rearrangement","tag-recent-posts","tag-schedule","tag-scheduled","tag-thumbnail","tag-tutorial","tag-widget","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68419"}],"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=68419"}],"version-history":[{"count":4,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68419\/revisions"}],"predecessor-version":[{"id":68424,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/68419\/revisions\/68424"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=68419"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=68419"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=68419"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}