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 January 27, 2022 16:49
WordPress Custom Post Types Events with specific parent page
<?php
define('EVENTS_PARENT_ID', 885);
function event_category_taxonomy() {
$labels = array(
'name' => _x( 'Categories', 'taxonomy general name', 'domain' ),
'singular_name' => _x( 'Category', 'taxonomy singular name', 'domain' ),
'search_items' => __( 'Search Categories', 'domain' ),
'all_items' => __( 'All Categories', 'domain' ),
@mirkoschubert
mirkoschubert / style.css
Created December 12, 2019 13:39
Divi 4 Theme Builder Hack for Fixed Navigation Bars (Pt. II)
/**
* THEME BUILDER HEADER FIX
*/
.child.et_fixed_nav.et_show_nav #main-header .et_pb_fullwidth_menu .et_pb_row,
.child.et_non_fixed_nav.et_show_nav #main-header .et_pb_fullwidth_menu .et_pb_row {
margin-top: 0;
margin-bottom: 0;
}
@media screen and (max-width: 980px) {
@mirkoschubert
mirkoschubert / functions.php
Created December 12, 2019 13:38
Divi 4 Theme Builder Hack for Fixed Navigation Bars (Pt. I)
/**
* Custom Body Class for Child Theme
*/
function divi_child_body_class( $classes ) {
$classes[] = 'child';
return $classes;
}
add_action( 'body_class', 'divi_child_body_class' );
/**
@mirkoschubert
mirkoschubert / tb-global-header-full-width.json
Created December 12, 2019 12:02
Global Header Layouts for the Theme Builder in Divi 4 by Elegantthemes
{
"context": "et_builder_layouts",
"data": {
"224": {
"ID": 224,
"post_date": "2019-12-12 11:56:14",
"post_date_gmt": "2019-12-12 11:56:14",
"post_content": "[et_pb_section fb_built=\"1\" fullwidth=\"on\" _builder_version=\"4.0.7\" background_color=\"#ffffff\" width=\"100%\" min_height=\"60px\" height=\"80px\" max_height=\"80px\" custom_margin=\"||||false|false\" custom_padding=\"||||false|false\" z_index=\"100\" custom_css_main_element=\"display: flex;||align-items: center;\" border_color_bottom=\"#d6d6d6\" global_module=\"95\" saved_tabs=\"all\" custom_css_main_element_last_edited=\"on|tablet\"][et_pb_fullwidth_menu fullwidth_menu=\"on\" logo=\"https:\/\/fra1.digitaloceanspaces.com\/wordpress-speedynetz\/2019\/12\/logo-example.svg\" logo_url=\"@ET-DC@eyJkeW5hbWljIjp0cnVlLCJjb250ZW50IjoiaG9tZV91cmwiLCJzZXR0aW5ncyI6e319@\" logo_max_height=\"60px\" show_search_icon=\"on\" cart_icon_color=\"#000000\" search_icon_color=\"#000000\" menu_icon_color=\"#000000\" _builder_version=\"4.0
@mirkoschubert
mirkoschubert / functions.php
Created December 12, 2019 11:06
Divi 4 Theme Builder Hack for Fixed Navigation Bars
/**
* Custom Body Class for Child Theme
*/
function divi_child_body_class( $classes ) {
$classes[] = 'child';
return $classes;
}
add_action( 'body_class', 'divi_child_body_class' );
/**
@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;
}
@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 / 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 / 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 / .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
#