Tutorials16 Apr, 2016

Create a sitemap, without a plugin

In this tutorial, I cover the steps needed to create a sitemap, without using a plugin. This is something that Thierry came up with, so full credit to him for the code. I'm just sharing it here so you guys can use it too.

What is a sitemap?

First off, I'm guessing most of you know what a sitemap is, but if not, here's a basic definition:A sitemap is an xml file that search engines use to know what content you want indexed and when your content has been updated.Normally you'd use one of the many plugins available, but now you don't have to. One less plugin to load and maintain is always a big plus in my books.So, on with the show. I hope you find it useful.

Download the example files

Example files Sitemap example child-theme
, , ,

4 Comments

  1. Only works if I have Beans theme? Because wp says me I need the parent theme

    • Correct, all the themes here on ThemeButler are built specifically for Beans 😉

  2. Hello!

    Thanks for sharing the code! I am currently using a child theme and I tried to apply your code only it does not seem to be working :/
    The modifications I made was adding my child theme name instead of the : 'beans_child_template_redirect'

    Any ideas of what might have gone south?

    Thanks in advance

    • Hi Despoina,

      Did you get this one sorted out? There are a few places where the code could go wrong, but I'd only really know once looking at your theme. One thing is for sure - you shouldn't be changing beans_child_template_redirect at all, as that is needed for it to work. If you'd like I can take a look for you, but I would need to charge for my time to do so. If you're happy with this, send an email [email protected] and we can discuss further.

      Cheers,
      Chris


Add a Comment

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

Comment *

Name *
Email *
Website