Skip to content

Instantly share code, notes, and snippets.

View BeginHere's full-sized avatar

Lucas Hanyok BeginHere

View GitHub Profile
@brichards
brichards / wpinstall.sh
Created February 7, 2022 16:26
A shell function to create a directory, install WordPress, configure SSL via Laravel Valet, an launch the site in Chrome
# Install a new WP site.
# Usage: wpinstall <sitename>
function wpinstall() {
# Make the directory in your local web root
mkdir ~/Sites/www/$@;
cd ~/Sites/www/$@;
# Download, config, and install WordPress using <sitename> for the database, URL, and site title
# Note: You'll need to configure your wp-cli defaults for core config and core install in a wp-cli.yml file
wp core download;
@hlashbrooke
hlashbrooke / functions.php
Last active April 6, 2022 16:49
WooCommerce Product Vendors: Add extra custom fields to vendor profiles
<?php
// Add fields to new vendor form
add_action( 'shop_vendor_add_form_fields', 'custom_add_vendor_fields', 2, 1 );
function custom_add_vendor_fields( $taxonomy ) {
?>
<div class="form-field">
<label for="vendor_website"><?php _e( 'Vendor website' ); ?></label>
<input type="text" name="vendor_data[website]" id="vendor_website" class="vendor_fields" /><br/>
<span class="description"><?php _e( 'The vendor\'s website.' ); ?></span>