To allow only certain IP addresses access to a development website and direct all other traffic to a maintenance or other page you can achieve this with the .htaccess file in your webroot directory. The following code can be used in a root level .htaccess file of the web site. Create a ‘maintenance.html‘ or other named file …
Read More
Socialising your Author Box in Genesis WordPress Theme
The Author Box in WordPress is sometimes overlooked and underused and it doesn’t display all the contact information entered such as Social Media contacts, this guide goes through turning it on, editing the contact meta info, using a new AuthorBox with the new contact info and using icon fonts to display those social media accounts. Turning on …
Read More
How to Create a Responsive Facebook Like Box in WordPress
You can create a responsive Facebook like box in WordPress or any other CMS platform or framework so that it sits in the sidebar or parent container at the correct 100% width which will just adjust to various device widths – all done in the CSS. This is the CSS declarations to add in your CSS …
Read More
Use Bootstrap Modals in WordPress Themes
Bootstrap has some nifty Javascript plugins in their library for the Bootstrap framework including Modals, which are pop up window dialog prompts. These modal pop up windows can be generated without writing javascript by using Bootstrap’s API data-attribute values which are inserted into the HTML markup and and can control which HTML element can control the …
Read More
Using Slick Responsive Navigation Mobile Menus on Genesis Child Theme
Import / Export a mysql database on the command line
To export a mysql database (as a dump) from the command line run: mysqldump database_name > database_exportname.sql To import a mysql database dump into a database: mysql database_name < database_exportname.sql To export all databases into a dump: mysqldump –all-databases > all_databases_export.sql To import one of these mysql databases from the dump into a database: mysql –one-database database_name < all_databases_export.sql
Create and Add Custom Taxonomy to WordPress Posts
Custom Taxonomies should be added to WordPress via a plugin so a theme is swapped the taxonomies are maintained. Taxonomies are either hierarchal similar to ‘Categories’ or flat, similar to ‘Tags’. You can assign custom taxonomies to regular posts as well as custom post types. Create the plugin header and file in /wp-content/plugins either as …
Read More
Find out how many database queries per pageload in WordPress
To find out how many WordPress mysql database queries a page requests and how long it takes the page to load whilst querying the database, you can add in a PHP function to a WordPress hook to find out. This can be displayed in either the source code of the html or rendered on the …
Read More