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.
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.
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:
- Then Choose “HTML”
You’ll repeat this for posts, categories, tags and authors.
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.
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”.