How to Differentiate Pages and Posts in WordPress Using Screaming Frog

Soooo, there are many times when I’m doing a website audit that I find the website structure is not organized well. Often times, sites have all pages and posts right off the root domain and are not organized into folders. For example, blog posts are not kept under a folder such as /blog/. So it’s hard to tell what is a page and what is a post. The reason I care about this is because I may prioritize the core website pages over blog posts in some cases.

In WordPress the body class tells you whether it’s a page, post, post category, post tag, or author archive. I had been trying to figure that out for a while and Jordan Choo from Kogneta was able to answer that for me in two seconds! He’s a whizz.

wordpress-body-class-example

I’ll show you how you pull in this data when using Screaming Frog for an audit.

Screaming Frog Custom Search

In Screaming Frog go to Configuration > Custom > Search.

screaming-frog-add-custom-search

Click the “+Add” button to create a new custom search item.

  • Name the search. I named my first one “Page”.
  • Then Choose “Contains”
  • Then Choose “RegEx”
  • Paste this into the empty box:
    <body class="*page
  • Then Choose “HTML”

You’ll repeat this for posts, categories, tags and authors.

find-wordpress-body-class-in-screaming-frog

Here are the code snippets you’ll need for that.

<body class="*page
<body class="*post
<body class="*category
<body class="*tag
<body class="*author

Don’t forget to save this as a configuration if you’d like to reuse it again. You can name it something like “WordPress Crawl” and use it only when crawling WordPress sites.

screaming-frog-configuration

Now run your crawl! Here’s how the results will look. If you see a “1” in any of these cells, that would mean “yes”.

screaming-frog-custom-search-result

About Dani Owens

Dani Owens, the owner of Pigzilla, has been in the digital marketing field since 2011. Her resources have been mentioned and shared by local SEO experts such as Eric Ward, Darren Shaw, Phil Rozek, Marie Haynes, David Mihm and Local U. From small, independent Mom-and-Pop shops, to enterprises with thousands of locations, Dani Owens has years of experience strategizing and implementing reliable local SEO tactics that lead to increased organic traffic and conversions.