{"id":22203,"date":"2016-05-25T03:01:36","date_gmt":"2016-05-24T17:01:36","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=22203"},"modified":"2016-05-25T07:01:50","modified_gmt":"2016-05-24T21:01:50","slug":"search-engine-optimization-meta-keywords-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/search-engine-optimization-meta-keywords-primer-tutorial\/","title":{"rendered":"Search Engine Optimization Meta Keywords Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/meta_keywords.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Search Engine Optimization Meta Keywords Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/meta_keywords.jpg\" title=\"Search Engine Optimization Meta Keywords Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Search Engine Optimization Meta Keywords Primer Tutorial<\/p><\/div>\n<p>We write to you today regarding another Search Engine Optimization (<a target=_blank title='Search Engine Optimization information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Search_engine_optimization'>SEO<\/a>) topic, building on our previous <a title='Search Engine Optimization Meta Description Primer Tutorial' href='#sepmdpt'>Search Engine Optimization Meta Description Primer Tutorial<\/a>, this time regarding Meta Keywords.  What is a Meta Keywords tag?  It is a tag whereby you can define the <a target=_blank title='Keywords information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Keyword_research'><i>keywords<\/i><\/a> you&#8217;d like associated with your webpage, as far as the Search Engines see it, goes.  The news is not all good here, though.  We found a good <a target=_blank title='Meta Keywords discussion webpage information' href='https:\/\/moz.com\/community\/q\/should-i-delete-meta-keywords-from-a-website'>webpage<\/a> from <a target=_blank title='Moz Landing page' href='https:\/\/moz.com\/'><i>Moz<\/i><\/a> to conclude that the jury is out on the use of this Meta Keywords tag now.  Reading between the lines, it seems it may have been misused in the past, and now the Search Engines tend to ignore it.  However, we&#8217;ve had static ones in the past, and we want to remedy that here today, at least with our WordPress Blog postings, as much as anything &#8230;<\/p>\n<ol>\n<li>to &#8220;tell it like it is&#8221; in a better way regarding our postings, and what content they contain &#8230; and &#8230;<\/li>\n<li>bring into play the very useful <a target=_blank title='WordPress explanation of wp_title function' href='https:\/\/codex.wordpress.org\/Function_Reference\/get_the_tag_list'>get_the_tag_list<\/a>( $before, $sep, $after ) function to retrieve a comma separated list of your current Blog Posting <a target=_blank title='WordPress tags information from WordPress' href='https:\/\/en.support.wordpress.com\/posts\/tags\/'>tags<\/a>, at any time, even within the context of (TwentyTen theme&#8217;s) good ol&#8217; header.php<\/li>\n<\/ol>\n<p>It behoves us now, with matters like this, to point out, that use of WordPress&#8217;s inbuilt <a target=_blank title='WordPress codex' href='https:\/\/codex.wordpress.org\/'>codex<\/a> code calls often &#8220;save the day&#8221; in terms of saving you having to interrogate the database yourself, in your PHP code, and is that powerful set of tools available to you, even as you write out your WordPress Blog posting webpage data in between the <i>&lt;head&gt; and &lt;\/head&gt;<\/i> (ie. the header section), as we make use of today in the <b>bold<\/b> changes (including the bits <b><strike>that used to be that got deleted<\/strike><\/b>) we show you being applied to good ol&#8217; header.php &#8230;<\/p>\n<p><code><br \/>\n&lt;head&gt;<br \/>\n&lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1, minimum-scale=0.25, maximum-scale=8, user-scalable=yes\" \/&gt;<br \/>\n&lt;meta charset=\"&lt;?php bloginfo( 'charset' ); ?&gt;\" \/&gt;<br \/>\n&lt;title&gt;&lt;?php wp_title( '|', true, 'right' ); ?&gt;&lt;\/title&gt;<br \/>\n&lt;meta name=\"description\" content=\"&lt;?php $ourt=wp_title( '|', false, 'right' ); echo str_replace(' | Robert Metcalfe Blog','',$ourt);  ?&gt;\" \/&gt;<br \/>\n<b><strike>&lt;meta name=\"Keywords\" content=\"rjmprogramming, HTML, Javascript, CSS, PHP, MySql, database, programming, GETME, software, code, tutorial, laptop, ESL, Google, Android, Tablet, App, Application, Software, Xcode, Mac OS X, Windows, Develop, useful, web, ideas, worth, pursuing, creative, Games\" \/&gt;<\/strike><\/b><br \/>\n<b><br \/>\n&lt;?php<br \/>\n$kws=get_the_tag_list( '', ',', '' );<br \/>\nif ($kws == '') {<br \/>\n  $kws=\"rjmprogramming, HTML, Javascript, CSS, PHP, MySql, database, programming, GETME, \";<br \/>\n  $kws.=\"software, code, tutorial, laptop, ESL, Google, Android, Tablet, App, Application, Software, Xcode, \";<br \/>\n  $kws.=\"Mac OS X, Windows, Develop, useful, web, ideas, worth, pursuing, creative, Games\";<br \/>\n  echo '&lt;meta name=\"keywords\" content=\"' . $kws . '\" \/&gt;' . \"\\n\";<br \/>\n} else {<br \/>\n  $bitskw=explode(\"&gt;\", $kws);<br \/>\n  $postkws=\"\";<br \/>\n  $mysep=\"\";<br \/>\n  for ($jk=1; $jk&lt;sizeof($bitskw); $jk++) {<br \/>\n    $thiskw=explode(\"&lt;\", $bitskw[$jk]);<br \/>\n    if (trim(str_replace(',','',$thiskw[0])) != '') $postkws.=$mysep .  str_replace('\"',' ',str_replace(\"'\",\" \",$thiskw[0]));<br \/>\n    $mysep=\", \";<br \/>\n  }<br \/>\n  echo '&lt;meta name=\"keywords\" content=\"' . $postkws . '\" \/&gt;' . \"\\n\";<br \/>\n}<br \/>\n?&gt;<br \/>\n<\/b><b><br \/>\n<\/b>&lt;link rel=\"profile\" href=\"http:\/\/gmpg.org\/xfn\/11\" \/&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; the effects of which you can see being played out with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/meta_keywords.jpg\" title='Click picture'>tutorial picture<\/a> &#8230; and, as such, is highly recommended, even if we prefer to do our own PHP coding at this blog.  After all, who knows more about WordPress than <a target=_blank title='WordPress.org' href='http:\/\/wordpress.org'>WordPress<\/a>.org and <a target=_blank title='WordPress.com' href='http:\/\/wordpress.com'>WordPress<\/a>.com especially regarding coding involving its MySql database.<\/p>\n<hr>\n<p id='sepmdpt'>Previous relevant <a target=_blank title='Search Engine Optimization Meta Description Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/search-engine-optimization-meta-description-primer-tutorial\/'>Search Engine Optimization Meta Description 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\/Mac\/meta_description.jpg\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Search Engine Optimization Meta Description Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/meta_description.jpg\" title=\"Search Engine Optimization Meta Description Primer Tutorial\"  \/><\/a><p class=\"wp-caption-text\">Search Engine Optimization Meta Description Primer Tutorial<\/p><\/div>\n<p>We write to you today regarding a Search Engine Optimization (<a target=_blank title='Search Engine Optimization information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Search_engine_optimization'>SEO<\/a>) topic regarding Meta Descriptions.  What is a Meta Description?  We found a good <a target=_blank title='Meta Description webpage information' href='https:\/\/moz.com\/learn\/seo\/meta-description'>webpage<\/a> from <a target=_blank title='Moz Landing page' href='https:\/\/moz.com\/'><i>Moz<\/i><\/a> which we quote from below &#8230;<\/p>\n<blockquote cite=\"https:\/\/moz.com\/learn\/seo\/meta-description\"><p>\nMeta descriptions are HTML attributes that provide concise explanations of the contents of web pages. Meta descriptions are commonly used on search engine result pages (SERPs) to display preview snippets for a given page.\n<\/p><\/blockquote>\n<p> &#8230; and so &#8220;builds a bridge&#8221; from your content to a precis of what the Search Engine could say for your webpage.  Make this engaging content, and you probably attract more readers.<\/p>\n<p>So which search engine attracts the most attention?  You guessed it &#8230; <a target=_blank title='Google Search Engine' href='http:\/\/www.google.com'>Google<\/a>.<\/p>\n<p>Below are some recent graph snapshots we got from this <a target=_blank title='Useful market share of search engines graphs' href='https:\/\/www.netmarketshare.com\/search-engine-market-share.aspx?qprid=4&#038;qpcustomd=0'>useful link<\/a> &#8230;<\/p>\n<ul>\n<li>Desktop &#8230; Google 71% <img src='http:\/\/www.rjmprogramming.com.au\/Mac\/desktop_se_graph.jpg' title='Desktop Search Engine graph'><\/img><\/li>\n<li>Mobile and Tablet &#8230; Google 95% <img src='http:\/\/www.rjmprogramming.com.au\/Mac\/mobile_se_graph.jpg' title='Mobile and tablet Search Engine graph'><\/img><\/li>\n<li>Console &#8230; Google 97% <img src='http:\/\/www.rjmprogramming.com.au\/Mac\/console_se_graph.jpg' title='Console Search Engine graph'><\/img><\/li>\n<\/ul>\n<p> &#8230; so it pays to drive traffic via Search Engine Optimization.  Which is easier to say, than to do.<\/p>\n<p>We&#8217;re going to give a go at this blog to using the Blog Posting Title as the content for this description (being as its &#8220;long windedness&#8221; is its self-explanation &#8230; chortle, chortle).  In WordPress TwentyTen theme&#8217;s good ol&#8217; header.php we used to have, in <b>bold<\/b> &#8230;<\/p>\n<p><code><br \/>\n&lt;title&gt;&lt;?php wp_title( '|', true, 'right' ); ?&gt;&lt;\/title&gt;<br \/>\n<b>&lt;!--meta name=\"Description\" content=\"RJM Programming develops useful mobile and web software. We specialize in Windows and Mac online web tutorials, Android and iOS mobile applications.\" \/--&gt;<\/b><br \/>\n<\/code><\/p>\n<p> &#8230; in other words, we hadn&#8217;t had one, but we&#8217;ll now be &#8220;using the Blog Posting Title as the content for this description&#8221; so that this header.php code snippet <b>becomes<\/b> &#8230;<\/p>\n<p><code><br \/>\n&lt;title&gt;&lt;?php <a target=_blank title='WordPress explanation of wp_title function' href='https:\/\/developer.wordpress.org\/reference\/functions\/wp_title\/'>wp_title<\/a>( '|', true, 'right' ); ?&gt;&lt;\/title&gt;<br \/>\n<b>&lt;meta name=\"description\" content=\"&lt;?php $ourt=wp_title( '|', false, 'right' ); echo str_replace(' | Robert James Metcalfe Blog','',$ourt);  ?&gt;\" \/&gt;<\/b><br \/>\n<\/code><\/p>\n<p>Maybe this will be food for thought for you?<\/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='#d22081' onclick='var dv=document.getElementById(\"d22081\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/meta\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22081' 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='#d22203' onclick='var dv=document.getElementById(\"d22203\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/codex\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d22203' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>We write to you today regarding another Search Engine Optimization (SEO) topic, building on our previous Search Engine Optimization Meta Description Primer Tutorial, this time regarding Meta Keywords. What is a Meta Keywords tag? It is a tag whereby you &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/search-engine-optimization-meta-keywords-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":[9,12,37],"tags":[151,1887,299,1888,776,777,827,932,1111,1120,1240,1319,1324,1325,1456],"class_list":["post-22203","post","type-post","status-publish","format-standard","hentry","category-database","category-elearning","category-tutorials","tag-blog","tag-codex","tag-database-2","tag-keywords","tag-meta","tag-meta-tag","tag-mysql","tag-php","tag-search-engine","tag-seo","tag-tag","tag-tutorial","tag-twentyten","tag-twentyten-theme","tag-wordpress"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22203"}],"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=22203"}],"version-history":[{"count":14,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22203\/revisions"}],"predecessor-version":[{"id":22231,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/22203\/revisions\/22231"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=22203"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=22203"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=22203"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}