Skip to content

Instantly share code, notes, and snippets.

Rick R. Duncan rickrduncan

Block or report user

Report or block rickrduncan

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
@rickrduncan
rickrduncan / header-image.php
Created Jul 3, 2013
Filter the genesis_seo_title function to use an image for the logo instead of a background image.
View header-image.php
<?php
//* Do NOT include the opening php tag
// Filter the genesis_seo_title function to use an image for the logo instead of a background image
add_filter( 'genesis_seo_title', 'b3m_header_title', 10, 3 );
function b3m_header_title( $title, $inside, $wrap ) {
$inside = sprintf( '<a href="%s" title="%s"><img src="'. get_stylesheet_directory_uri() .'/images/logo.png" alt="%s" /></a>', trailingslashit( home_url() ), esc_attr( get_bloginfo( 'name' ) ), get_bloginfo( 'name' ) );
return sprintf( '<%1$s id="title">%2$s</%1$s>', 'h4', $inside );
}
@rickrduncan
rickrduncan / style.css
Created Jul 3, 2013
Remove smiley place added into your footer by the WordPress JetPack plugin
View style.css
/* Remove smiley place added to your footer by the WordPress JetPack plugin */
img#wpstats {
display: none;
}
@rickrduncan
rickrduncan / 404.php
Created Jul 5, 2013
404 page temple for the Genesis Framework. Includes a test for the Yoast SEO plugin in order to alter the page title.
View 404.php
<?php
/*
Template Name: Error 404
*/
/**
* Handles the display of website 404 page. Includes a widget area for easy customization.
*
* @author B3Marketing, LLC — Rick R. Duncan
* @license http://www.opensource.org/licenses/gpl-license.php GPL v2.0 (or later)
View logo-login.php
<?php
//* Do NOT include the opening php tag
//* Login Screen: Change login logo
add_action( 'login_head', 'b3m_custom_login_logo' );
function b3m_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_stylesheet_directory_uri().'/images/login.png) !important; background-size: 311px 100px !important;height: 100px !important; width: 311px !important; margin-bottom: 0 !important; padding-bottom: 0 !important; }
.login form { margin-top: 10px !important; }
</style>';
View logo-login-header-title.php
<?php
//-> Do NOT include the opening php tag
//-> Login Screen: Change login logo hover text
add_filter( 'login_headertitle', 'rvam_login_logo_url_title' );
function rvam_custom_header_title() {
return 'REPLACE THIS WITH YOUR TEXT';
}
View remember-me.php
<?php
//-> Do NOT include the opening php tag
// Login Screen: Set 'remember me' to be checked
add_action( 'init', 'rvam_login_checked_remember_me' );
function rvam_login_checked_remember_me() {
add_filter( 'login_footer', 'rvam_rememberme_checked' );
}
function rvam_rememberme_checked() {
View failed-login.php
<?php
//-> Do NOT include the opening php tag
// Login Screen: Don't inform user which piece of credential was incorrect
add_filter ( 'login_errors', 'rvam_failed_login' );
function rvam_failed_login () {
return 'The login information you have entered is incorrect. Please try again.';
}
View custom-admin-logo.php
<?php
//-> Do NOT include the opening php tag
// Custom admin dashboard header logo
add_action('admin_head', 'rvam_custom_admin_logo');
function rvam_custom_admin_logo() {
echo '<style type="text/css">#icon-index { background-image: url('.get_stylesheet_directory_uri().'/images/logo-dashboard.png) !important; background-position: 0 0;}</style>';
}
@rickrduncan
rickrduncan / admin-footer-text.php
Created Jul 20, 2013
Place the Php code into your theme's functions.php file to customize the admin footer text in WordPress.
View admin-footer-text.php
View wp-dashboard-widget.php
<?php
//-> Do NOT include the opening php tag
// Add theme info box into WordPress Dashboard
add_action('wp_dashboard_setup', 'rvam_add_dashboard_widgets' );
function rvam_add_dashboard_widgets() {
wp_add_dashboard_widget('wp_dashboard_widget', 'Theme Details', 'rvam_theme_info');
}
function rvam_theme_info() {
You can’t perform that action at this time.