Skip to content

Instantly share code, notes, and snippets.

View braddalton's full-sized avatar

Brad Dalton braddalton

View GitHub Profile
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>';
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');
<?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/