Skip to content

Instantly share code, notes, and snippets.

John Regan johnregan3

Block or report user

Report or block johnregan3

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@johnregan3
johnregan3 / gutenberg-custom-editor-styles.php
Last active Apr 16, 2019
Gutenberg Custom Editor Styles - PHP
View 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 / wp-amp-tutorial-primary-nav.php
Last active Feb 13, 2019
Adding a Primary Navigation Menu to an AMP WordPress Theme
View wp-amp-tutorial-primary-nav.php
<?php
/**
* Register the amp-sidebar component script with WP AMP.
*
* This goes in your amp.php
*/
function jr3_amp_sidebar_component_script( $data ) {
$data['amp_component_scripts']['amp-sidebar'] = 'https://cdn.ampproject.org/v0/amp-sidebar-0.1.js';
return $data;
}
@johnregan3
johnregan3 / wordpress-transients-tutorial-02.php
Last active Dec 26, 2018
WordPress Transients Tutorial, Part 2
View wordpress-transients-tutorial-02.php
<?php
/**
* Get Books posts.
*
* This is from a tutorial found here:
* @link https://johnregan3.wordpress.com/how-to-improve-wordpress-load-times-using-transients
*
* @since 1.0.0
*
* @param array $genre_array An array of genre slugs.
@johnregan3
johnregan3 / wordpress-transients-tutorial-01.php
Last active Dec 26, 2018
WordPress Transients Tutorial, Part 1
View wordpress-transients-tutorial-01.php
<?php
/**
* Get News posts.
*
* This is from a tutorial found here:
* @link https://johnregan3.wordpress.com/how-to-improve-wordpress-load-times-using-transients
*
* @since 1.0.0
* @uses jr3_news_query
*
@johnregan3
johnregan3 / better-related-posts-05.php
Last active Dec 25, 2018
WordPress get related posts - 05
View better-related-posts-05.php
@johnregan3
johnregan3 / better-related-posts-04.php
Last active Dec 25, 2018
WordPress get related posts - 04
View better-related-posts-04.php
@johnregan3
johnregan3 / related-posts-tutorial-02.php
Last active Dec 25, 2018
WordPress Related Posts Tutorial, Part 2
View related-posts-tutorial-02.php
@johnregan3
johnregan3 / related-posts-01.php
Last active Dec 25, 2018
WordPress Related Posts Tutorial, Part 1
View related-posts-01.php
@johnregan3
johnregan3 / related-posts-tutorial-03.php
Last active Dec 25, 2018
WordPress Related Posts Tutorial, Part 3
View related-posts-tutorial-03.php
@johnregan3
johnregan3 / better-related-posts-01.php
Last active Dec 25, 2018
WordPress get related posts - 01
View better-related-posts-01.php
You can’t perform that action at this time.