Skip to content

Instantly share code, notes, and snippets.

View mirkoschubert's full-sized avatar

Mirko Schubert mirkoschubert

View GitHub Profile
@mirkoschubert
mirkoschubert / functions.php
Last active August 29, 2015 14:23
WordPress Footer Navigation as String
if (!function_exists('theme_footer_menu')) :
function theme_footer_menu($args = array('theme_location' => 'secondary', 'seperator' => '•')) {
$args['seperator'] = ($args['seperator'] != '') ? ' ' . $args['seperator'] . ' ' : ' ';
if ($args['theme_location'] == '') {
return false;
} else {
if ( ( $locations = get_nav_menu_locations() ) && isset( $locations[ $args['theme_location'] ] ) ) {
$menu = wp_get_nav_menu_object( $locations[ $args['theme_location'] ] );
$menu_items = wp_get_nav_menu_items($menu->term_id);
register_nav_menus(array(
'primary' => __('Primary Menu', 'textdomain' ),
'secondary' => __('Secondary Menu', 'textdomain' )
));
wp_nav_menu(array('theme_location' => 'primary'));
@mirkoschubert
mirkoschubert / .vpn_helpers.sh
Created August 19, 2017 18:13 — forked from rfairburn/.vpn_helpers.sh
Mac OS X command-line VPN Helpers
#!/bin/bash
# Source this file in your .bash_profile e.g.:
#
# source ~/gitcheckouts/vpn_heplers/.vpn_helpers.sh
#
# Note: This script works best with NOPASSWD: ALL configured in your sudoers file:
# /etc/sudoers:
# %admin ALL=(ALL) NOPASSWD: ALL
#
@mirkoschubert
mirkoschubert / keybase.md
Last active October 20, 2018 10:38
keybase.md

Keybase proof

I hereby claim:

  • I am mirkoschubert on github.
  • I am mirkoschubert (https://keybase.io/mirkoschubert) on keybase.
  • I have a public key ASB6UzZl2xjSgUAFQm_1xa268fZ1DGC1sFzp-Miou76BHwo

To claim this, I am signing this object:

@mirkoschubert
mirkoschubert / functions.php
Created October 4, 2019 08:40
Give a WordPress Child Theme a body Class
/**
* Custom Body Class for Child Theme
*/
function child_body_class( $classes ) {
$classes[] = 'child';
return $classes;
}
add_action( 'body_class', 'child_body_class' );
@mirkoschubert
mirkoschubert / style.css
Created October 4, 2019 08:45
Change Style of Usercentrics Cookie Banner in WordPress (with Child Theme body Class)
.child #uc-banner-centered .uc-banner-content .uc-banner-text {
color: #c64444;
font-size: 14px;
line-height: 1.5;
}
.child #usercentrics-button .uc-btn-new.uc-btn-accept {
background-color: #42bccc;
color: #baf608;
}
@mirkoschubert
mirkoschubert / style.css
Created October 7, 2019 08:30
Fix for Josef
.child .et_pb_gallery .et_pb_gallery_image {
border: none;
width: 100% !important;
}
.child .et_pb_gallery .et_pb_grid_item {
clear: none !important;
margin: 0 !important;
width: 20% !important;
}