Skip to content

Instantly share code, notes, and snippets.

View djm56's full-sized avatar
🏠
“don’t touch turbo boost something tells me you shouldn’t turbo boost”

Donovan Maidens djm56

🏠
“don’t touch turbo boost something tells me you shouldn’t turbo boost”
View GitHub Profile
@djm56
djm56 / README.md
Last active June 24, 2020 11:40
Setting up wp-config.php using some best practices, setting up environment variables in Apache and using these in wp-config.php. File names for conf files in apache may change depending on your environment.

Intructions for the site conf file in Apache

Find the apache conf file for the website /etc/apache/sites-available/sitename.conf

Edit the file and add the environment variables.

database_name, database_user, database_password and database_host are unique to your MySQL instance.

SetEnv DB_NAME database_name
@djm56
djm56 / gist:338eec0f4b67c7f7975a40ccc8efe8dd
Last active November 30, 2017 12:18
Make gallery Images in Divi Square.
.et_pb_grid_item .et_pb_gallery_image {
padding-top:100%;
}
.et_pb_grid_item img {
position: absolute;
height: 100%;
top: 0;
left: 0;
right: 0;
@djm56
djm56 / header.php
Last active May 13, 2017 06:56
Simple Login and Logoff Link for WordPress
<?php
/*
*
* This checks if user is logged in
* If Logged in display logout link else display login link
* Also note the redirects to the login page and the home page.
*
*/
<?php if (is_user_logged_in()) : ?>
@djm56
djm56 / functions.php
Last active November 23, 2016 14:19
Show All TinyMCE in WordPress add this to functions.php in theme
<?php
/**
* Add the to functions.php
**/
function enable_more_buttons($buttons) {
$buttons[] = 'fontselect';
$buttons[] = 'fontsizeselect';
$buttons[] = 'styleselect';
$buttons[] = 'backcolor';
@djm56
djm56 / for-functions.php
Last active April 4, 2016 11:23
WooCommerce - Add Select Field To Check Out and then Route to specific mail.
<?php
/**
* Add the field to the checkout
**/
add_action('woocommerce_after_order_notes', 'my_custom_checkout_field');
function my_custom_checkout_field( $checkout ) {
echo '<div id="my_custom_checkout_field"><h3>'.__('My Field').'</h3>';
@djm56
djm56 / sanfrancisco-font.css
Created November 11, 2015 06:55
Linking and using San Francisco Web Font
@charset "utf-8";
/* San Francisco Font Regular */
@font-face {
font-family: 'San Francisco';
font-weight: 400;
src: url('https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.eot'); /* IE9 Compat Modes */
src: url('https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.eot?#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff2') format('woff2'), /* Super Modern Browsers */
url('https://applesocial.s3.amazonaws.com/assets/styles/fonts/sanfrancisco/sanfranciscodisplay-regular-webfont.woff') format('woff'), /* Pretty Modern Browsers */