Skip to content

Instantly share code, notes, and snippets.

Coffee is for Committers!

Joseph Dickson josephdickson

Coffee is for Committers!
Block or report user

Report or block josephdickson

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
View WordPress: Display post title, post thumbnail, and post excerpt
if ( have_posts() ) :
while ( have_posts() ) : the_post();
echo '<article>';
echo '<a href="' . get_permalink() . '">';
the_title( '<h2 class="entry-title">','</h2>' );
if (has_post_thumbnail() ) {
// get thumbnail id for use later
$thumbnail_id = get_post_thumbnail_id();
josephdickson / post-page-user-log-in-required-twentynineteen
Last active Apr 29, 2019
Restirct WordPress post or page to logged in users
View post-page-user-log-in-required-twentynineteen
* Single post and page template for restricting the title and content unless the user is logged in
* Sources:
* @link
* @package WordPress
josephdickson / functions-example.php
Created Oct 18, 2018
Add to functions.php to customize font size options
View functions-example.php
add_action( 'wp_enqueue_scripts', 'twenty_seventeen_gutenberg_enqueue_styles' );
// Font size options
function mytheme_setup_theme_supported_features() {
add_theme_support( 'editor-font-sizes', array(
'name' => __( 'extra small', 'themeLangDomain' ),
'shortName' => __( 'xs', 'themeLangDomain' ),
'size' => 10,
'slug' => 'extrasmall'
You can’t perform that action at this time.