How to add post meta data before it has been saved or published? Can’t use transitional hooks. After digging through code, you have to use add_meta_boxes action.
Let’s say you have a custom post type book. Each book has several properties (meta data), such as the author, the publisher and the publication date. Now, WordPress has a nice feature called Custom Fields. It is an interface for adding meta data to your posts: a meta key on left and meta value on right. When a new book is created, however, Custom Fields are empty because no meta data has been added to the book yet. The question is: how can we add custom meta data to a post (book) before it has been saved as a draft or published? Continue reading “Add new post meta data on ‘Add New’ page programmatically”
Recently, I had to modify the default WordPress admin post editor (TinyMCE) configuration on a specific post type. I wanted to remove a few buttons, Quicktags, limit the number of rows and so on. At first, I was puzzled over which hook I should use. In the end, it turned out to be pretty easy to accomplish that.
During Contribution Day, WordPress enthusiasts get together in a coworking space and work on various WordPress-related tasks such as translations, fixing Core tickets and others. Yesterday, we had a first-ever Contribution Day in Slovakia as the part of WordCamp. It was awesome! Why?
Today, I’ve put my bachelor thesis about WordPress performance optimizations into Git revision control repository. It will help me to track changes and history and enables my supervisor to follow the work. I’ve also put the repo on GitHub. Link: https://github.com/lamosty/wp-perf-optimization-bachelor
Although writing articles on your blog is not directly related to WordPress development, it helps you in many aspects. Similar to having a multitude of tools empowering your programming endeavors, having some of them while writing an article can make your task easier and the result better, especially if English is not your mother tongue. In today’s post, I’m going to describe some of them. Continue reading “Tools for better writing”
Nginx is a modern and fast web server software. If you are not familiar with Nginx, you might be familiar with the Apache HTTP web server software. Both of them can serve your WordPress-powered site, though there are notable differences in performance and the way they work. I won’t be comparing them in this article, we’ll do it the other day. Instead, I’m going to show you some useful Nginx server configuration for having a more secure WordPress site. Continue reading “Securing your WordPress site running on Nginx”
In the second article of the Ansible and WordPress series, we discussed the basic Ansible project structure and setting up WP-CLI and PHP. Today, I’ll walk you through creating a new database, adding a new user with correct permissions to this database, downloading WordPress with WP-CLI and configuring it properly to use our newly created database. You can find complete source code of these series at my wordpress-ansible GitHub repo. Continue reading “Automated WordPress installation with Ansible”