Skip to content

Instantly share code, notes, and snippets.

@larsschenk
Last active June 27, 2016 11:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save larsschenk/74d71094fe6c94c8fdfaccc5dff1b0bb to your computer and use it in GitHub Desktop.
Save larsschenk/74d71094fe6c94c8fdfaccc5dff1b0bb to your computer and use it in GitHub Desktop.
# Baylys Kiteboarding Child
Just a simple start for a WordPress child theme for keyboarding based on baylys.
This file should give the gist a meaningfull title, only ;-)
/* Let the style.css empty by design and use this css instead.
This way we can work around the cache by increaging version numbers.
*/
#footer {
background:#000045 !important;
}
<?php
// slow down heartbeat
add_filter('heartbeat_send', 'my_heartbeat_settings');
function my_heartbeat_settings($response)
{
if ($_POST['interval'] != 60) {
$response['heartbeat_interval'] = 60;
}
return $response;
}
// remove unwanted dashboard widgets for relevant users
function remove_dashboard_widgets()
{
remove_meta_box('dashboard_primary', 'dashboard', 'normal'); // wp news
remove_meta_box('dashboard_quick_press', 'dashboard', 'side');
$user = wp_get_current_user();
if (!$user->has_cap('manage_options')) {
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');
remove_meta_box('dashboard_plugins', 'dashboard', 'normal');
remove_meta_box('dashboard_secondary', 'dashboard', 'normal');
remove_meta_box('dashboard_incoming_links', 'dashboard', 'normal');
remove_meta_box('dashboard_recent_drafts', 'dashboard', 'side');
remove_meta_box('dashboard_recent_comments', 'dashboard', 'normal');
remove_meta_box('dashboard_right_now', 'dashboard', 'normal');
}
}
add_action('admin_init', 'remove_dashboard_widgets');
// load style
add_action('wp_enqueue_scripts', 'my_theme_enqueue_styles');
function my_theme_enqueue_styles()
{
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css', array(), '1.1.1');
wp_enqueue_style('child-style', get_stylesheet_directory_uri().'/baylys-kiteboarding-child.css', array(), '0.0.3');
}
/*
Theme Name: Baylys Kiteboarding Child
Theme URI: http://www.ocx.de/baylys-kiteboarding-child/
Description: Baylys Leible Child Theme, https://gist.github.com/larsschenk/74d71094fe6c94c8fdfaccc5dff1b0bb
Author: Lars Schenk but mostly Jan K. ;-)
Author URI: https://ocx.de
Template: baylys
Version: 0.0.3
Tags: light, responsive-layout
Text Domain: baylys-kiteboarding-child
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment