Skip to content

Instantly share code, notes, and snippets.

View frankschrijvers's full-sized avatar

WPStudio frankschrijvers

View GitHub Profile
<?php
/**
* Register and load font awesome
*
* @author Themebuilder.nl
*/
add_action( 'wp_enqueue_scripts', 'prefix_enqueue_awesome' );
/** Customize search form input box text */
add_filter( 'genesis_search_text', 'custom_search_text' );
function custom_search_text($text) {
return esc_attr( 'Doorzoek Themebuilder' );
}
genesis_register_sidebar( array(
'id' => 'nav-social-menu',
'name' => __( 'Social Menu', 'themebuilder' ),
'description' => __( 'The place for Simple Social Icons widget.', 'themebuilder' ),
) );
add_filter( 'genesis_nav_items', 'sws_social_icons', 10, 2 );
add_filter( 'wp_nav_menu_items', 'sws_social_icons', 10, 2 );
function sws_social_icons($menu, $args) {
// Replace WP login logo with your own
add_action('login_head', 'wpstudio_custom_login_logo');
function wpstudio_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_stylesheet_directory_uri().'/images/login.png) !important;
background-size: 220px 50px !important;
height: 50px !important;
width: 220px !important;
margin-bottom: 0 !important;
// Replace WP login logo with your own
add_action('login_head', 'themebuilder_custom_login_logo');
function themebuilder_custom_login_logo() {
echo '<style type="text/css">
h1 a { background-image:url('.get_stylesheet_directory_uri().'/images/login.png) !important;
background-size: 220px 50px !important;
height: 50px !important;
width: 220px !important;
margin-bottom: 0 !important;
@frankschrijvers
frankschrijvers / url-logo.php
Last active August 29, 2015 14:08
url-logo.php
// Change the URL of the WP login logo
function themebuilder_url_login_logo(){
return get_bloginfo( 'wpurl' );
}
add_filter('login_headerurl', 'themebuilder_url_login_logo');
@frankschrijvers
frankschrijvers / modify_footer
Created October 28, 2014 12:50
modify_footer
@frankschrijvers
frankschrijvers / add_dasboard_widget
Last active August 29, 2015 14:08
add_dasboard_widge
/ Add theme info box into WP Dashboard
function themebuilder_add_dashboard_widgets() {
wp_add_dashboard_widget('wp_dashboard_widget', 'Theme Details', 'themebuilder_theme_info');
}
add_action('wp_dashboard_setup', 'themebuilder_add_dashboard_widgets' );
function themebuilder_theme_info() {
@frankschrijvers
frankschrijvers / admin_css
Created October 28, 2014 13:34
admin_css
// Custom WP Admin Color Scheme
function admin_css() {
wp_enqueue_style( 'admin_css', get_template_directory_uri() . '/admin.css' );
}
add_action('admin_print_styles', 'admin_css' );
@frankschrijvers
frankschrijvers / custom_genesis_credits
Created October 28, 2014 13:39
custom_genesis_credits
// Customize the credits
add_filter( 'genesis_footer_creds_text', 'themebuilder_footer_creds_text' );
function themebuilder_footer_creds_text() {
$creds = '[footer_copyright] [footer_childtheme_link before ="&middot;"] &middot; by <a href="http://www.themebuilder.nl" title="ThemeBuilder">ThemeBuilder</a>';
return $creds;
}