Skip to content

Instantly share code, notes, and snippets.

@stephtreasure
Created November 26, 2014 20:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stephtreasure/f2c180778bb2eaa6963f to your computer and use it in GitHub Desktop.
Save stephtreasure/f2c180778bb2eaa6963f to your computer and use it in GitHub Desktop.
text/x-generic functions.php-bak
PHP script text
<?php
require_once(TEMPLATEPATH.'/lib/init.php');
// Add support for custom background
if (function_exists('add_custom_background')) {
add_custom_background();
}
/** Add support for 3-column footer widgets */
add_theme_support( 'genesis-footer-widgets', 3 );
add_action('genesis_before_footer', 'mytheme_remove_footer_widgets',3);
function mytheme_remove_footer_widgets() {
if ( is_page(523) )
remove_action('genesis_before_footer', 'genesis_footer_widget_areas');
}
//* Do NOT include the opening php tag
//* Modify the speak your mind title in comments
add_filter( 'genesis_comment_form_args', 'custom_comment_form_args' );
function custom_comment_form_args($args) {
$args['title_reply'] = 'I would love to hear from you. Please share your feedback or questions below. I read and respond to each one.';
return $args;
}
/** Remove the post meta function */
remove_action( 'genesis_after_post_content', 'genesis_post_meta' );
/** Remove page titles */
add_action( 'get_header', 'child_remove_page_titles' );
function child_remove_page_titles() {
if ( is_page_template ( 'page_landing.php' ) )
remove_action( 'genesis_post_title', 'genesis_do_post_title' );
}
/** Customize the entire footer */
remove_action( 'genesis_footer', 'genesis_do_footer' );
add_action( 'genesis_footer', 'child_do_footer' );
function child_do_footer() {
if (is_page( array(2201, 1426, 2286 )) { ?>
<a href="http://www.stephanietreasure.com/earnings-disclaimer/">Earnings Disclaimer</a> | <a href="http://www.stephanietreasure.com/terms/">Terms</a> | <a href="http://www.stephanietreasure.com/contact/">Contact Us</a>
<?php } else { ?>
<p><font size="2">Services: <a href="http://www.stephanietreasure.com/client-attractive-websites/">Client-Attractive Websites</a> | <a href="http://www.stephanietreasure.com/services/social-media-management-services/">Social Media Management</a> <br/> Coaching Programs: <a href="http://www.stephanietreasure.com/oneonone-ecoaching-consulting/">One-on-One E-Coaching & Consulting</a> | <a href="http://www.stephanietreasure.com/online-presence-profit-strategy-session/">Online Presence Profit Strategy Session</a> <br/>Products: <a href="http://www.incomemodelsforsuccess.com/">Income Models for Success Kit</a><br/><a href="http://www.stephanietreasure.com/privacy-policy/">Privacy Policy</a> | <a href="#">Affiliate</a> | <a href="http://www.stephanietreasure.com/earnings-disclaimer/">Earnings Disclaimer</a> | <a href="http://www.stephanietreasure.com/terms/">Terms</a> | <a href="http://www.stephanietreasure.com/contact/">Contact Us</a><br/>Copyright �2012 StephanieTreasure.com | Stephanie Treasure Marketing | ALL RIGHTS RESERVED </font></p>
<?php }
}
/** Register newsletter widget area */
genesis_register_sidebar( array(
'id' => 'newsletter',
'name' => __( 'Newsletter', 'custom-theme' ),
'description' => __( 'This is the newsletter section.', 'custom-theme' ),
) );
/** Add the newsletter widget after the post content */
add_action( 'genesis_after_post_content', 'custom_theme_newsletter' );
function custom_theme_newsletter() {
if ( ! is_singular( 'post' ) )
return;
genesis_widget_area( 'newsletter', array(
'before' => '<div id="newsletter widget-area">',
) );
}
/** Modify the Genesis content limit read more link */
add_filter( 'get_the_content_more_link', 'custom_read_more_link' );
function custom_read_more_link() {
return '... <a class="more-link" href="' . get_permalink() . '">[Continue Reading]</a>';
}
/** Register widget areas */
genesis_register_sidebar( array(
'id' => 'welcome-text',
'name' => __( 'Welcome Text', 'genesis' ),
'description' => __( 'This is the welcome text widget.', 'themename' ),
) );
/** Add the welcome text section */
add_action( 'genesis_before_content_sidebar_wrap', 'custom_welcome_text' );
function custom_welcome_text() {
genesis_widget_area( 'welcome-text', array(
'before' => '<div class="welcome-text widget-area">',
) );
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment