Skip to content

Instantly share code, notes, and snippets.

View johnregan3's full-sized avatar

John Regan johnregan3

View GitHub Profile
<?php
define('DOMAIN_CURRENT_SITE', 'local-www.kiss925.com');
// ** Site URL settings ** //
define('WP_SITEURL', 'local-www.kiss925.com');
define('WP_HOME', 'local-www.kiss925.com');
@johnregan3
johnregan3 / keybase.md
Created May 17, 2017 17:10
Keybase Verification

Keybase proof

I hereby claim:

  • I am johnregan3 on github.
  • I am johnregan3 (https://keybase.io/johnregan3) on keybase.
  • I have a public key whose fingerprint is BF11 701D 8DF1 68F1 8796 28ED A894 0B45 6721 8112

To claim this, I am signing this object:

@johnregan3
johnregan3 / full-width-image-theme-support.php
Last active December 19, 2018 05:29
Add Full Width Image Support in a WordPress Theme - PHP
<?php
/**
* Add Theme Support for wide and full-width images.
*
* Add this to your theme's functions.php, or wherever else
* you are adding your add_theme_support() functions.
*
* @action after_setup_theme
*/
function jr3_theme_setup() {
@johnregan3
johnregan3 / full-width-image-theme-support.css
Last active December 19, 2018 05:29
Add Full Width Image Support in a WordPress Theme - CSS
.alignwide {
/* Set these margins to work with your own theme. */
margin-left: -80px;
margin-right: -80px;
max-width: 100vw;
}
.alignfull {
margin-left: calc(-100vw / 2 + 100% / 2);
margin-right: calc(-100vw / 2 + 100% / 2);
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.php
Last active April 16, 2019 16:08
Gutenberg Custom Editor Styles - PHP
<?php
/**
* Enqueue the Gutenberg editor stylesheet.
*
* Put this in your functions.php.
*
* @action enqueue_block_editor_assets
*/
function jr3_enqueue_gutenberg() {
// Make sure you link this to your actual file.
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.css
Last active December 21, 2018 22:48
Gutenberg Custom Editor Styles - CSS
/* Custom Editor Styles */
/*
* With some edits, this can be used as a base for your Custom Editor Styles.
* Note that this is for demonstration purposes only, and some elements may not
* be covered here.
*/
/* Approximate the theme width, except for full-width images. */
.wp-block:not( '.editor-block-list__block["data=full"]' ) {
@johnregan3
johnregan3 / better-related-posts-final.php
Created December 24, 2018 15:08
WordPress get related posts - Final
@johnregan3
johnregan3 / better-related-posts-01.php
Last active December 25, 2018 13:03
WordPress get related posts - 01
@johnregan3
johnregan3 / related-posts-tutorial-02.php
Last active December 25, 2018 15:59
WordPress Related Posts Tutorial, Part 2
@johnregan3
johnregan3 / related-posts-tutorial-03.php
Last active December 25, 2018 15:58
WordPress Related Posts Tutorial, Part 3