Add custom list item to Breadcrumb NavXT

A client wanted an additional list item in his Breadcrumb NavXT

Came up with the following action in theme functions.php:


Put WordPress in maintenance mode without a plugin

1. In your web root directory (where the wp-config.php is located) create file .maintenance
2. It’s content should be <?php $upgrading = time();
3. You can customize the page by creating wp-content/maintenance.php

See sourceĀ

Get wp-content/uploads files from live site on localhost

While modifying clients WordPress sites I don’t download the uploads directory contents so to avoid 404s in Chrome’s Developer Tools console I modified .htaccess to redirect those URLs to the live site. Tested in a docker container.

How to create .pot file from source code

I just learned how to create a .pot from

Checkout WordPress development branch via SVN which has a script for creating .pot file.

cd /tmp
svn co wordpress-svn
php wordpress-svn/tools/i18n/makepot.php wp-plugin PATH_TO_PLUGIN PATH_TO_PLUGIN/language/PLUGIN_NAME.pot

makepot.php help

Usage: php makepot.php PROJECT DIRECTORY [OUTPUT]

Generate POT file from the files in DIRECTORY [OUTPUT]
Available projects: generic, wp-frontend, wp-admin, wp-network-admin, wp-tz, wp-plugin, wp-theme, glotpress, rosetta, wporg-bb-forums, wporg-themes, wporg-plugins, wporg-forums, wordcamporg

Sorry, you are not allowed to access this page after wp-admin login

If you see the following text, Sorry, you are not allowed to access this page. after logging into WP admin.
Screen Shot 2017-08-27 at 17.30.52

Then you might have change the database prefix. Usermeta table contains

Where the prefix bz_ is the database prefix specified in wp-config.php

Proof from the source code at