Skip to content

Instantly share code, notes, and snippets.

@patric-boehner
patric-boehner / content-more.php
Last active August 18, 2016 20:46
Modify The Entry Content and Entry Excerpt Read More Link
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Modify Entry Content Read More Link | Display > Entry Content
add_filter( 'get_the_content_more_link', 'pb_read_more_link' );
//* Modify Entry Excerpt Read More Link | Display > Entry Excerpt
add_filter( 'excerpt_more', 'pb_read_more_link' );
function pb_read_more_link() {
@patric-boehner
patric-boehner / single.php
Last active August 16, 2016 09:20
Display featured image at the top of single posts in Genesis.
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Add Featured Image Before Content
/*
* If Before Content is not the right location to
* achive full width than play with other Genesis hooks.
* Take a look at, https://my.studiopress.com/docs/hook-reference/
@patric-boehner
patric-boehner / ReadMe.md
Last active August 13, 2016 11:05
Simple Album Proofing

#Simple Album Proofing

Notes and ideas for building a simple album proofing plugin for wordpress

I would like to create a plugin that gives clients a simple way to create and manage album proofing from within a wordpress website.

###Components

  • Custom Post Type
  • Custom Post Status
@patric-boehner
patric-boehner / ReadMe.md
Last active August 9, 2016 11:47
Deploying to Multiple Environments with Dandelion Deploy

You can create a separate config file for each environment and then deploy to each by running:

dandelion --config=dandelion-dev.yml deploy
dandelion --config=dandelion-live.yml deploy

Refrance:

@patric-boehner
patric-boehner / call-to-action-widget.php
Last active September 2, 2016 18:38
A simple call to action widget for wordpress with a title, two text areas, a button and area for shortcode.
<?php
// Call To Action Widget
//**********************************************
/**
* @package CoreFunctionality
* @since 2.0.0
* @copyright Copyright (c) 2016, Patrick Boehner
* @license GPL-2.0+
@patric-boehner
patric-boehner / editor-placeholder-text.php
Created August 4, 2016 08:19
Change Editor Title Placeholder Text
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//**********************************************
// Testimonial Editor Title Placeholder Text
//**********************************************
add_filter( 'enter_title_here', 'pb_change_testimonial_title_placeholder_text' );
function pb_change_testimonial_title_placeholder_text( $title ){
@patric-boehner
patric-boehner / social-share.js
Last active December 5, 2022 23:29
Add Simple Custom Social Share Buttons for Genesis
//* This is completly optional. You can leave it off to save some page weight.
/*
* Add to theme/js/dev
* Output to theme/js/social-share.min.js
*/
//* Simpel Social Share Link Popouts
//* http://www.jaredatchison.com/code/create-manual-social-media-share-buttons/
@patric-boehner
patric-boehner / entry-comments.php
Last active August 1, 2016 05:40
Adding Facebook Comments to Genesis Single Posts
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
/*
* Add to theme/inc/partials
*/
//**********************************************
//* Facebook Comments
//**********************************************
@patric-boehner
patric-boehner / modify-query.php
Created August 1, 2016 01:24
Use CMB2 to create a yes/no select field and query posts by that value
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
add_action( 'pre_get_posts', 'pb_change_services_query' );
function pb_change_services_query( $query ) {
if( $query->is_main_query() && !is_admin() && is_post_type_archive( 'pb_cpt_services' ) ) {
$meta_query = array (
@patric-boehner
patric-boehner / cmb2-wysiwyg.php
Last active July 28, 2016 20:45
snippet of striped down CMB2 WYSIWYG meta field options
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
// WYSIWYG Minimal Field
//* https://github.com/WebDevStudios/CMB2/wiki/Field-Types#wysiwyg
$cmb2->add_field( array(
'name' => 'Field Name',
'desc' => 'Add a description(optional)',
'id' => $prefix . 'wysiwyg-text',
'type' => 'wysiwyg',