Using The SEO Framework with Advanced Custom Fields

I’m going to go out on a limb and guess that I am not the only WordPress developer who in recent days (in the wake of their obnoxious Black Friday dashboard ad) has switched allegiance from Yoast to another SEO plugin, and that many of those who find themselves in a similar boat (to mix metaphors) have switched to The SEO Framework.

I’ve only been using it for a couple of days, but I already love it. It does all of the things I actually used Yoast for, without any of the other stuff I did not use it for. I mean honestly, maybe readability scores and “cornerstone content” do provide an SEO boost, but I barely understand how to use these tools, so good luck explaining them to my clients in a meaningful way. I suppose they’re more of a tool for full-time SEO consultants who need to pad out their billable hours. (Sorry not sorry. My opinion on the business of SEO hasn’t changed all that much since 2011.)

It wasn’t until the Black Friday ad that I really admitted to myself how much I don’t like Yoast. It does a lot of important things, and does them very well. But it’s obnoxious as hell about it. Pushing features you don’t really want or need into every page of the WordPress admin, and plastering its own over-designed admin screens with tons of garish ads promoting its “premium” features.


The SEO Framework encapsulates all of the key features I liked about Yoast into a single configuration screen, which kindly adheres to the standard WordPress admin UI design language instead of infusing its own brand style into every button and metabox border. It’s refreshingly boring to look at. And it just has the stuff I actually use, like title and description, OpenGraph tags, sitemap XML, the basic elements of SEO that unequivocally matter and can be a pain to build and maintain on your own.

But enough about all of its great features. There’s one key thing it lacks: support for Advanced Custom Fields. My standard “modular design” theme relies almost entirely on ACF’s Flexible Content fields to work its page layout magic, and with all of the page content stored in custom fields instead of post_content, there’s nothing for The SEO Framework to latch onto to auto-generate meta descriptions.

Fortunately, the developer has built in some hooks to allow you to customize the meta description output.

Here’s a barebones starting point:

function my_seo_framework_description($description, $args) {
  if (empty($description)) {
    $description = ''; // Add your own logic here!
  return $description;
add_filter('the_seo_framework_custom_field_description', 'my_seo_framework_description', 10, 2);
add_filter('the_seo_framework_generated_description', 'my_seo_framework_description', 10, 2);
add_filter('the_seo_framework_fetched_description_excerpt', 'my_seo_framework_description', 10, 2);

As the developer notes, it’s very important for SEO not to just output the same static description text on every page. You need to have a function of your own that will read your ACF field content and generate something meaningful here.

Fortunately in my case, I had already done that, for generating custom excerpts from ACF content, so I was able to just stick a call to that function into the // Add your own logic here! line. You’ll need to customize your function to suit your specific content structure, but here’s the post that I used as a starting point for my function.

Have fun!

SEO doesn’t matter

Note (April 22, 2011): I rarely second-guess myself after posting a blog entry, but this was one of those rare cases. I reconsidered the post due to the fact that shortly after writing it, I observed a case with a client where SEO did matter. But upon further, um, reconsideration, I decided the post did still have merit, because the type of SEO we were dealing with was not the type of SEO I’m talking about here. In fact, “the type of SEO we were dealing with” is something I’m reluctant to call SEO at all, even though that’s denotatively what it is: search engine optimization. But there’s a huge difference between semantic HTML, well formed title and meta tags, and carefully constructed sitemap.xml and robots.txt files, versus “gaming the system,” which is the negative connotation SEO typically carries, and what I’m focusing on in my criticism here. So… on we go. With a few edits for clarification.

There, I said it. Well, actually I’ve been saying it in various ways for years, so what I actually mean is: there, I made it the title of a blog post. And if SEO does matter at all, then people who don’t think SEO matters (and somehow feel inclined to express that sentiment in Google’s search box) will soon be viewing this post. (Huh?)

Today I was perusing my RSS feeds (a good way to find information that is relevant to your interests, often much more effective than just searching for random terms on Google), and I came across a blog post entitled Whitehat SEO Is a Joke. Intrigued, I read it, and it made some sense. The argument in a nutshell is that whitehat SEO is, really, just ineffective SEO. This spawned a satirical response, Blackhat SEO Is a Joke. It made some sense too. And that’s when the thought really coalesced in my mind: all SEO is a joke. Not because on one end of the spectrum it’s ineffectual and on the other it’s unethical. Because manipulating search engine rankings shouldn’t really matter to a sustainable business model.

To the Twittermobile!

Forget SEO. If your business model depends significantly on search engine rankings, you're doing something wrong.

After some thought (and a few minutes of research), I followed up with this:

To wit: Google "Minneapolis web development" and I don't come up until page 4 of the results. IT DOESN'T MATTER. I have plenty of work.

So, what do I really mean here? In this specific example of my own work, what I mean is I don’t depend on random people googling “Minneapolis web development” to get work. I get most of my work through the network of contacts I’ve developed over a decade and a half of professional experience, and through referrals from past clients. And even if I do want people to be able to find me on Google, which of course I do, I expect they would type Room 34, not Minneapolis web development. Go ahead and google “Room 34.” I’ll wait.

Welcome back. And guess what? I didn’t spend a cent on SEO consulting, and I didn’t spend much time of my own thinking about SEO either. I thought about well-formed semantic HTML and relevant content and that just happened. But it still doesn’t matter because I don’t depend on search engine rankings for business.

If you’re building a website as a means to promote your business, or if the website is your business, you’ll certainly want to appear in relevant search results, but ultimately your goal is quite simply to get people to your website, regardless of how they got there. Search engines are therefore a marketing tool — hopefully only one of many you’ll be employing — and if search engines don’t lead visitors to your site based on its own merits, then the problem is not the search engines and their confounded algorithms, it’s your site.

Don’t ask me what the other marketing tools are or should be. I’m a web developer, not a marketer. For myself, word-of-mouth and business cards have been the only marketing tools I’ve needed. Other businesses need other strategies, and the first thing any business needs to do when developing a marketing strategy is to figure out where its business is likely to come from and how best to reach that audience.

Regardless of whether you’re deeply immersed in the world of SEO or you hold it at arm’s length like I do, there are some interesting and relevant points in the two blog posts I linked to above, but I think the most salient is this, from the blackhat post:

If however you have a web property that has some value to it, then true blackhat strategies are not the way forward.

Black, white or gray, all SEO (apart from basic web design best practices, careful [and responsible] use of legitimate tools like sitemap.xml and robots.txt files, Google Webmaster Tools, and meaningful, relevant content) is essentially about gaming the system. Some techniques may achieve more immediate impact, and others may have more lasting value, but ultimately I see only two reasons to engage in any of them:

  1. Your content and/or its presentation doesn’t have enough value on its own.
  2. Your business model itself is based on gaming the system.

If the latter is true, there’s nothing I can say or do to help you or to persuade you to act otherwise. We’re simply in this world for different reasons and will never see eye to eye. If the former is true, however, there’s an alternative. It’s a lot more work, but in some ways that’s the point: make your content better. And that will often lead to an even broader, harder, and more important task: figure out what you’re really trying to do in the first place. Because if you need to be on the first page of a generic Google results page to stay in business, maybe you don’t really have much of a business at all.

Addendum, a few hours later: Like I said…
Google search for "SEO doesn't matter"

Search Engine Optimization (SEO): the good, the bad and the (mostly) ugly

Years ago I first encountered a mysterious acronym: SEO. I bristled when I learned what it meant: Search Engine Optimization. The term can be both innocuous and poisonous. In its innocuous form, it means, quite simply, presenting your site in a way that is most likely to lead to prominent placement in search results. In its poisonous form, it means deceiving the algorithms search engines use, in essence, tricking the search engines into listing your site when they shouldn’t.

That the latter connotation has become the primary meaning of the term is unfortunate, as there is a legitimate role in web design and development for tuning your website for maximum effectiveness in search engine listings. Doing it the right way does not involve gaming the system. In fact, the principles of sound search engine optimization aren’t really about search engines at all: they’re simply rules of good design, ensuring that your site is well-formed, well-organized and intuitive. In short, the best honest ways of appealing to a search engine’s algorithms are going to be the same ways of appealing to the real target of your website: human users. After all, the goal of a search engine like Google is to deliver the most relevant results to its users. And if your site isn’t relevant to a particular user, it shouldn’t be coming up in their search results anyway.

Derek Powazek has an excellent blog entry called Spammers, Evildoers and Opportunists that pulls no punches in criticizing the dark side of SEO. So much so, in fact, that one questions whether there is any other side to it. Ultimately, maybe not. The question then is what to call the best practices in web design and development that just happen to also be the most effective legitimate ways to optimize your site for search engine placement. I don’t have an answer, but I have to admit that after reading his blog, I’m reluctant to use the term “Search Engine Optimization” any longer.

Some background here: for the past year or so I’ve been including a brief section in all proposals I’ve created for new clients, entitled “Search Engine Optimization,” wherein I talk about these best practices, criticize unscrupulous SEO tactics, and give my recommendations for how best to build a website (in ways that also just happen to be good for search engine placement). I give this information away for free. I do, however, charge my clients for work I do to these ends. It’s not smoke and mirrors, and it’s not snake oil. But it is actual work, it does take time, and if it’s not something the client can or will do for themselves, then it’s something I need to bill them for. Powazek says:

Look under the hood of any SEO plan and you’ll find advice like this: make sure to use keywords in the headline, use proper formatting, provide summaries of the content, include links to relevant information. All of this is a good idea, and none of it is a secret. It’s so obvious, anyone who pays for it is a fool.

Right on, brother. But here’s the thing: while I will gladly share this information with any client for free, there is still work involved to implement these ideas. And if I’m the one doing the work, I bill for it, just like any other work I do. I believe what he’s really criticizing is the practice of charging simply for sharing this information. Much like the late-night infomercials that promise riches in real estate, the real get-rich-quick scheme is in selling the information itself; the person who’s going to get rich is the one selling training books and videos, not land.

Let the information be free. Here, word for word, is the information I include in every proposal I write:

Search Engine Optimization

“Search Engine Optimization” (SEO) is a common buzzword today, but what does it really mean? Many web consultants will offer “advanced SEO techniques” and submission to thousands of search engines. But most of these techniques are dubious at best, and most of the thousands of search engines are irrelevant to directing significant traffic to a website.

Ultimately there are a few simple principles that, when implemented on a website, will help to ensure the site receives proper placement in the search results of the most popular search engines, like Google, Yahoo! and MSN. Because the principles are so basic, and correspond so closely with the principles of simple, clean, well-organized web design in general, Room 34 offers these recommendations, free of charge, as a standard part of all website proposals:

Title Bar

The web browser’s title bar is easy to ignore, but a well-structured page title is one of the most important ways to ensure that your site is listed prominently in search engine results. The title should be clear, relevant, detailed, and specific. Each page of the site should have a title that accurately reflects what is on the page. The page title should begin with this specific information, followed by general information that is the same for every page: your business name, the nature of your business, and if relevant, your city and state.

Meta Tags

Meta tags do not appear anywhere on the web page, but they are included in the HTML header of the page to assist search engines in identifying the relevance of a web page if its textual content does not fully reflect its purpose. There are two primary meta tags used by search engines: keywords and description. Keywords is a comma-separated list of words or phrases that describe the content of your page. The description is a sentence or two that can be used in search engine results to summarize the content of your page. Meta tags should be as concise and accurate as possible. Excessive repetition of terms, or content that does not accurately reflect what is on the page will hurt search engine rankings rather than help them.

Semantic HTML

Semantic HTML means HTML that is built to reflect the logical structure of a web page document, with visual presentation separated into CSS (Cascading Style Sheets) rather than embedded within the HTML. Fonts, colors and visual layout elements should be restricted to the CSS. HTML tables should be used for tabular information only, not layout and positioning. The content of the page within the HTML should be organized such that the page is logical and readable with CSS turned off. Also, it is increasingly important that documents be formated with valid XHTML rather than older HTML specifications. Pages should be checked against an XHTML validator ( to ensure accuracy.


Building web pages with proper accessibility for visually-impaired visitors also helps to ensure a semantic HTML structure that will improve search engine rankings. All images and other visual content should include “alt” text. Content that requires Flash, JavaScript or other browser plug-ins should also include a standard fallback version to allow them to “degrade gracefully” for screen readers, browsers without these add-on features, mobile devices, and search engines. By organizing features like site navigation into standard HTML unordered lists instead of elaborate table layouts or Flash elements, pages will be both more widely accessible and more relevant in search engine results.

Relevant Links

Most modern search engines like Google use cross-site links as an indication of a site’s popularity and relevance in a particular field. By exchanging meaningful links with relevant sites in a particular field, a site can improve its search engine results. There may be a temptation here to exchange links with sites that are simply aggregators of links. This might provide a temporary boost to search engine placement, but ultimately if the links are not on sites that offer real live users a meaningful web experience, they will not provide long-term benefit. Before exchanging links with another site, consider whether or not it is a site you would visit and trust as a resource. If not, it is probably not worth the effort.

No Magic Bullet

There is no secret weapon to ensure top search engine placement. Many promises of search engine optimization rely on short-term “gaming” of a search engine’s relevance ranking algorithms. But just as the “gamers” evolve their tactics, the search engines are constantly being enhanced to counteract them. Ultimately the best way to ensure long-term relevance within search engine listings is to stick to the principles of well-organized, validated XHTML documents and meaningful content.