Search Engine Optimization Meta Keywords Primer Tutorial

Search Engine Optimization Meta Keywords Primer Tutorial

Search Engine Optimization Meta Keywords Primer Tutorial

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 can define the keywords you’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 webpage from Moz 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’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 …

  1. to “tell it like it is” in a better way regarding our postings, and what content they contain … and …
  2. bring into play the very useful get_the_tag_list( $before, $sep, $after ) function to retrieve a comma separated list of your current Blog Posting tags, at any time, even within the context of (TwentyTen theme’s) good ol’ header.php

It behoves us now, with matters like this, to point out, that use of WordPress’s inbuilt codex code calls often “save the day” 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 <head> and </head> (ie. the header section), as we make use of today in the bold changes (including the bits that used to be that got deleted) we show you being applied to good ol’ header.php …


<head>
<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=0.25, maximum-scale=8, user-scalable=yes" />
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php wp_title( '|', true, 'right' ); ?></title>
<meta name="description" content="<?php $ourt=wp_title( '|', false, 'right' ); echo str_replace(' | Robert Metcalfe Blog','',$ourt); ?>" />
<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" />

<?php
$kws=get_the_tag_list( '', ',', '' );
if ($kws == '') {
$kws="rjmprogramming, HTML, Javascript, CSS, PHP, MySql, database, programming, GETME, ";
$kws.="software, code, tutorial, laptop, ESL, Google, Android, Tablet, App, Application, Software, Xcode, ";
$kws.="Mac OS X, Windows, Develop, useful, web, ideas, worth, pursuing, creative, Games";
echo '<meta name="keywords" content="' . $kws . '" />' . "\n";
} else {
$bitskw=explode(">", $kws);
$postkws="";
$mysep="";
for ($jk=1; $jk<sizeof($bitskw); $jk++) {
$thiskw=explode("<", $bitskw[$jk]);
if (trim(str_replace(',','',$thiskw[0])) != '') $postkws.=$mysep . str_replace('"',' ',str_replace("'"," ",$thiskw[0]));
$mysep=", ";
}
echo '<meta name="keywords" content="' . $postkws . '" />' . "\n";
}
?>

<link rel="profile" href="//gmpg.org/xfn/11" />

… the effects of which you can see being played out with today’s tutorial picture … 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 WordPress.org and WordPress.com especially regarding coding involving its MySql database.


Previous relevant Search Engine Optimization Meta Description Primer Tutorial is shown below.

Search Engine Optimization Meta Description Primer Tutorial

Search Engine Optimization Meta Description Primer Tutorial

We write to you today regarding a Search Engine Optimization (SEO) topic regarding Meta Descriptions. What is a Meta Description? We found a good webpage from Moz which we quote from below …

Meta 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.

… and so “builds a bridge” 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.

So which search engine attracts the most attention? You guessed it … Google.

Below are some recent graph snapshots we got from this useful link

  • Desktop … Google 71%
  • Mobile and Tablet … Google 95%
  • Console … Google 97%

… so it pays to drive traffic via Search Engine Optimization. Which is easier to say, than to do.

We’re going to give a go at this blog to using the Blog Posting Title as the content for this description (being as its “long windedness” is its self-explanation … chortle, chortle). In WordPress TwentyTen theme’s good ol’ header.php we used to have, in bold


<title><?php wp_title( '|', true, 'right' ); ?></title>
<!--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." /-->

… in other words, we hadn’t had one, but we’ll now be “using the Blog Posting Title as the content for this description” so that this header.php code snippet becomes


<title><?php wp_title( '|', true, 'right' ); ?></title>
<meta name="description" content="<?php $ourt=wp_title( '|', false, 'right' ); echo str_replace(' | Robert James Metcalfe Blog','',$ourt); ?>" />

Maybe this will be food for thought for you?

If this was interesting you may be interested in this too.


If this was interesting you may be interested in this too.

This entry was posted in Database, eLearning, Tutorials and tagged , , , , , , , , , , , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>