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
View genesis-search-form-label.php
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
//* Customize Genesis search form label
add_filter( 'genesis_search_form_label', 'b3m_search_form_label' );
function b3m_search_form_label ( $text ) {
return esc_attr( 'Enter your text here...' );
View customize-genesis-search-button.php
<?php
//* Do NOT include the opening php tag above
//* Customize the default search button text
add_filter( 'genesis_search_button_text', 'b3m_genesis_search_button_text' );
function b3m_genesis_search_button_text( $text ) {
return esc_attr( 'Go' );
}
View genesis-search-form-input-box.php
<?php
//* Do NOT include the opening php tag above
//* Customize search form input box text of Genesis child themes
add_filter( 'genesis_search_text', 'b3m_genesis_search_text' );
function b3m_genesis_search_text( $text ) {
return esc_attr( 'Search my blog...' );
View functions.php
<?php
//* Do NOT include the opening php tag
//* Enqueue FontAwesome. Note that the current version in the code is 4.5.0. Update as necessary.
//* https://codex.wordpress.org/Plugin_API/Action_Reference/wp_enqueue_scripts
//* https://fortawesome.github.io/Font-Awesome/icons/
<?php
//* Do NOT include the opening php tag
@rickrduncan
rickrduncan / 0_reuse_code.js
Created Jan 17, 2016
Here are some things you can do with Gists in GistBox.
View 0_reuse_code.js
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
View dashicon-genesis-searchbox-styles.css
.search-form {
position: relative;
}
.search-form > input {
padding-left: 40px;
}
.search-form input[type="submit"] {
background: none !important;
View dashicon-search-button-genesis.php
<?php
//* Do NOT include the opening php tag
//* Use dashicon for search button
//* http://melchoyce.github.io/dashicons/
add_filter( 'genesis_search_button_text', 'b3m_search_button_dashicon' );
function b3m_search_button_dashicon( $text ) {
return esc_attr( '&#xf179;' );
View enqueue-dashicons.php
<?php
//* Do NOT include the opening php tag
//* Enqueue Dashicons
add_action( 'wp_enqueue_scripts', 'b3m_enqueue_dashicons' );
function b3m_enqueue_dashicons() {
wp_enqueue_style( 'dashicons' );
}
View wp-login-headerurl.php
<?php
//* Do NOT include the opening php tag
//* Login Screen: Use your own URL for login logo link
add_filter( 'login_headerurl', 'b3m_url_login' );
function b3m_url_login(){
return get_bloginfo( 'wpurl' ); //This line keeps the link on current website instead of WordPress.org
}
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', 'b3m_add_dashboard_widgets' );
function b3m_add_dashboard_widgets() {
wp_add_dashboard_widget('wp_dashboard_widget', 'Theme Details', 'b3m_theme_info');
}
You can’t perform that action at this time.