Skip to content

Instantly share code, notes, and snippets.

Avatar

Brad Dalton braddalton

View GitHub Profile
View gist:6360909
add_action('genesis_post_content', 'title');
function title() {
if ( is_single() && genesis_get_custom_field('title') )
echo '<hr /><div id="postition_title">Title: '. genesis_get_custom_field('title') .'</div>';
}
add_action('genesis_post_content', 'phone');
function phone() {
if ( is_single() && genesis_get_custom_field('phone') )
echo '<div id="phone">Phone Number: '. '<a href="tel:' .genesis_get_custom_field('phone') . '">' . genesis_get_custom_field('phone') .'</a></div>';
View Display Text Paragraph Before Post Multiple Pages Add Class Genesis
function add_text_before_post() {
if (is_page(array(54, 38269))) {
echo '<div class="before-post">Add Your Paragraph of Text Here</div>';
}}
/***
* @author Brad Dalton - WP Sites
* @link http://wpsites.net/web-design/code-snippets-for-adding-custom-functions/
***/
add_action('genesis_before_post', 'add_text_before_post');
View Display Footer Widgets Pages Only Genesis
View 404.php
<?php
/**
* Handles display of 404 page not found errors.
*
* Custom 404 page not found error template. Exclude Hidden Pages From 404 Page Not Found Error Page.
*
* @category Genesis
* @package Templates
* @author Brad Dalton
* @link http://wpsites.net/web-design/add-content-404-page-genesis/