I’ve been developing a WordPress child theme based on Astra for a client recently. This child theme comes with a custom post type, and I ran into a bit of trouble trying to remove the Astra Settings Meta Box (which Astra tags onto every single post type) from my custom post type.Continue reading
If you, for some reason, are trying to remove the WordPress admin bar on the backend using
show_admin_bar(false) to no avail, that’s because the method does not remove the admin bar on the WordPress admin backend by design. If you still want to remove it, then this article is for you.
If you didn’t know already, this blog is not the only thing that we work on — we also take on clients to work on website and web-related projects for them. Recently, we worked on a website project where we had to code a custom WordPress post type into the custom theme we made for the client (yes we make those).
This custom post type (which shall henceforth be called Articles — what we named the post type) was supposed to serve a purpose similar to the default WordPress Post — it was meant to go into a blog section for the website, and the client wanted to be able to assign categories to individual articles. All of this is pretty standard fare when it comes to WordPress customisation, as you can easily figure out how to do it reading official guides and documentation from WordPress:
- Adding custom post types: developer.wordpress.org/plugins/post-types/
- Adding custom taxonomies (e.g. categories): developer.wordpress.org/plugins/taxonomies/
We needed something a bit more though, as we wanted to customise the permalinks (i.e. auto-generated URL) of our Articles such that they are:
- Preceeded by the
- Display the year and month before the post title, e.g.
- Display a list of articles posted on the specified year and month if it was specified in the URL, e.g.
example.com/article/2021/03would show all the articles posted in March 2021.
Want to find out how we did it? Then continue reading.Continue reading