By default, the WordPress backend search searches for post titles and the post content. If you have a lot of pages, it can be hard to find the correct page when you want to link pages or insert pages to a menu. If you want to change that, so that WordPress only searches for the […]
By default, Easy Digital Downloads Updater caches the result of the update check for several hours. If you want to force EDD to check for updates again, you can use this SQL statement to delete the cached result: Replace my_wp_db by your WordPress database name and customize wp_options to match your table prefix settings.
There seems to be a bug when using MySQL in combination with the latest macOS release. After some time, MySQL stops working. I discovered the problem mostly when working with WordPress and Laravel Valet. You may discover the problem when you find something similar to “MySQL server has gone away” in MySQL logs or as […]
If you want to add some custom CSS to your WordPress backend, you can add this to your functions.php: Now, you can add a backend-style.css to your (child) theme folder and start styling your WordPress backend.
If you want to add a custom WordPress menu item by code, you can use the code below: If $menu_item_id is 0, a new menu item will be created. If you specify a specific ID instead, the menu item with this ID will be updated. Add a Page to the Menu If you want to […]
Update 2020-02-11: The latest Ninja Forms update improved the security of the plugin. That’s why the following code does not work anymore. Ninja Forms knows about the problem and made this topic to a “Top Issue”, see here. By default, only Administrator users have access to the Ninja Forms backend pages. If you want to […]
Get a Form In this example we get a form by its ID: Get Form Fields In this example, we get all the fields from the form with ID 1: Get Field Keys In this example, we get all the field keys for the form with ID 1: Get Submission by ID In this example, […]
Disable XML-RPC in WordPress WordPress XML-RPC can be used to try several thousands passwords in a short time – great for hackers using brute force attacks. To avoid this, you can disable XML-RPC by adding this line of code to your WordPress installation: This line does not disable XML-RPC completly – but it disables all […]
If you want to remove all items from a WordPress navigation menu, you may be have to do a lot of clicks. Another option might be using this code snippet: All you have to do is to modify the $menu_id variable and then add this code to your functions.php (or somewhere else, where it gets […]
If you have the problem, that the the_content filter is being called multiple times, you might use an SEO plugin like Yoast SEO, that uses the_content to generate META tags. To identify the relevant the_content filter call, you can use in_the_loop(), an example: