Carlo Fontanos

Full Stack Developer

Indent WordPress Subcategories in a Drop-down List

Recently I was working on a front-end Ad Listing project, I needed to allow users to make posts on the front-end side and be able to select a category they want their ad to be listed in. Of course we do not want to be listing the selection of these categories in just one line, so in this tutorial I am going to show you how you can nicely indent the children of your categories in a drop-down list

On the back-end, this is how my custom categories look like:

What we are going to do is to convert the above photo into a Drop-down list and indent all the children just like how it was shown on the photo.