Archive for May, 2007

Visualizing the Default WordPress Theme

Thursday, May 24th, 2007

After so very many descriptions of how to create WordPress themes–and after having creating a bunch of them–I decided to try to really try to understand how WordPress templates actually work. The greatest frustration for me, was that when designing a new theme, and formatting it with CSS codes, I realized that it was extremely difficult to determine which elements, classes, and id’s were responsible for which formatting.

References to the articles read are below. There were two key points that I had heretofore, through “messing around,” not been aware of:

  1. You can make an entire theme just by including a style.css file, and optionally, an images subdirectory. You need to tell WordPress which theme you want your theme to piggyback off of, by refering to the directory name of that theme. The syntax (within the CSS comment at the top of the style.css file) is: Template: theme-directory-name.
  2. It is highly recommended that one become familiar with the logic and structure of the default theme (Kubrik), as it has been thoroughly code-tested, and should conform to the best of the WordPress standards.

On the first note, I decided to create a style.css file piggybacking off of the default theme. At first, it just looked like this:

/*
Theme Name: CSS-Only Base Theme
Template: default
*/

It was interesting to go into the Presentation tab, and load that theme up. It was just a plain, raw HTML page, with almost no formatting at all. Then, I proceeded to style it based on my expectations. I was able to make a very attractive, simple theme. But what I also found was, I was having a very hard time understanding which elements, div’s, and id’s were wrapping which areas. Therefore, I created a file specifically to indicate this, based on all of the div’s and id’s in the default template. The file also indicates where the included modules (footer.php, header.php, and sidebar.php) begin and end. Here is the file:

I discovered that, using this visual guide, I was much more able to see what I was doing, and construct a clean and useful theme. And I also discovered, happily, that the structure of the default template is really quite simple. Using this visual guide, as well as basing my theme designs as much as possible off of the default template, I will be able to minimize the changes I need to make in the code. Where necessary, it will be better to comment out a piece of the template (or often, just to turn off its display using CSS). This approach allows me to make almost all the changes I need to in the CSS, rather than mess with the PHP files.

References (from the WordPress Codex site):

“Meta Optimization Service,” and Other Myths of Search Engine Optimization

Tuesday, May 15th, 2007

There’s been a lot of lore spread about how web pages actually get found. I notice a good number of people have a vague—and usually incorrect—idea of how the process of search engine optimization (the art of getting your pages found by people using search engines) works, including the idea of hiring a “Meta Optimization Service”. Years ago, it was considered important to optimize for META tags, but no longer. Here’s a list of eight such myths:

  1. “Submit your site to the major search engines.” In fact, if you submit your site to some search engines directly—including Google—you’ll have a higher chance of being considered spam, than if you used other methods to get your site indexed.
  2. “Use tools that promise to automatically submit your site to thousands of different search engines.” The vast majority of the sites an automated tool will submit your site are pretty inconsequential, and at worst, could be seen as spam by the major search engines like Google, who are always looking for ways of avoiding indexing anything that looks like it was done by an automated process that could be the work of a spammer.
  3. “It’s good to trade links with other sites to build your search rank.” Actually, “link trading” no longer helps your page ranking at all. There are a good number of helpful linking strategies that a certified SEO can utilize, however.
  4. “Write pages that contain the words you want to be found on, and searchers will naturally find your pages.” This is almost as serious as the idea that if you just put up a web site, people will find you and call you. Without doing thorough keyword research on your topic—and basing it on the real data of what people are actually searching on, you’re likely to fail to get your pages found, unless you happen to be so lucky as to have a very narrow niche topic that’s generating a lot of interest.
  5. “The KEYWORDS and DESCRIPTION meta tags are really important for search optimization.” Years ago it may have been helpful to hire a “Meta Optimization Service”. But since Google no longer pays attention to the KEYWORDS and DESCRIPTION tags, they are of little use now. A trained SEO is able to embed good search keywords into your page in all the places it needs to go to get the highest result.
  6. “Cram every keyword into your KEYWORDS meta tag that someone might possibly search on to find your page.” In fact, if you cram too many words into your keywords tag, it will probably just dilute the potency of the real keywords you are targeting for your page.
  7. “Have all backward links point to your home page.” In fact, you need to be very selective in terms of where backward links (that is, links from other sites to your site) point to—they should be targeted to the specific pages you’re targeting.
  8. “All links to my site are good links.” In fact, if you’re not careful, links to your site might be seen as spam, if the search engine’s spiders don’t see them as coming from a valid, useful, and relevant page.

The idea of hiring a “Meta Optimization Service” is outmoded at this point. However, a professional SEO can optimize your pages without too much work, using current methods.