Skip to content

Instantly share code, notes, and snippets.

Avatar

Marco Michely Jehu

View GitHub Profile
@Jehu
Jehu / splitmenu.php
Last active Feb 16, 2022
WordPress: Menu for Child pages (Split Menu)
View splitmenu.php
<?php
function mwe_get_parent_title() {
$post = get_post();
return get_the_title($post->post_parent);
}
function mwe_get_sidebar_menu() {
$post = get_post();
if ( is_page($post->ID) && $post->post_parent ) {
$children = get_pages(array(
@Jehu
Jehu / shortcode_year.php
Created Feb 8, 2022
WordPress - Jahreszahl Shortcode
View shortcode_year.php
<?php
function year_shortcode () {
$year = date_i18n ('Y');
return $year;
}
add_shortcode ('year', 'year_shortcode');
@Jehu
Jehu / image_sizes.php
Created Feb 8, 2022
WordPress - Additional Image Sizes
View image_sizes.php
<?php
add_theme_support( 'post-thumbnails' );
add_image_size( 'image-480', 480, 0 );
add_image_size( 'image-640', 640, 0 );
add_image_size( 'image-720', 720, 0 );
add_image_size( 'image-960', 960, 0 );
add_image_size( 'image-1168', 1168, 0 );
add_image_size( 'image-1440', 1440, 0 );
add_image_size( 'image-1920', 1920, 0 );
@Jehu
Jehu / functions.php
Last active Jun 15, 2022
ACSS Colors in Gutenberg (WIP)
View functions.php
<?php
/**
* AutomaticCSS is a CSS Framework (Oxygen onyl at the time)
* This Code adds the Oxygen generated Colors as Gutenberg Color Palette
* and adds inline CSS for the corresponding Gutenberg color CSS classes
*
* https://automaticcss.com/
*/
@Jehu
Jehu / mySidebarPlugin.php
Created May 1, 2021
WordPress Custom Sidebar
View mySidebarPlugin.php
<?php
/**
* Plugin Name: My Custom Sidebars
*/
/*
* Use this code for creating all sections you need, just add
* as many register_sidebar() functions as you need here.
*/
@Jehu
Jehu / functions.php
Last active Feb 28, 2020
Set hreflang="x-default" for WP Globus WordPress Plugin
View functions.php
<?php
/* ---------------------------------------------------------------------------
* Set hreflang="x-default" with WP Globus
* --------------------------------------------------------------------------- */
add_filter( 'wpglobus_hreflang_tag', 'custom_head_hreflang_xdefault', 10, 2 );
function custom_head_hreflang_xdefault() {
$hreflangs = WPGlobus_Utils::hreflangs();
$default_language = WPGlobus::Config()->default_language;
@Jehu
Jehu / plugin.php
Last active Nov 29, 2019
Use Groundhogg contact fields inside WPForms as smart tags
View plugin.php
<?php
/**
* Plugin Name: WPForms GH Contact Smart Tag
* Plugin URI:
* Description: Use Groundhogg contact fields inside WPForms with Smart Tags. Se here for more informations about WPFOrms Smart Tags: https://wpforms.com/docs/how-to-use-smart-tags-in-wpforms/
* Version: 1.0
* Author: Marco Michely
* Author URI: https://www.michely-web-engineering.de
*/
defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
View keybase.md

Keybase proof

I hereby claim:

  • I am jehu on github.
  • I am mmichely (https://keybase.io/mmichely) on keybase.
  • I have a public key ASCAd9n8UUGPWk3ulM4B_i6aq1xaghJSTlqJVaTkl9JxhQo

To claim this, I am signing this object:

@Jehu
Jehu / README.md
Last active Jan 18, 2017 — forked from anonymous/README.md
basic navigation component with marko (v4) and koa (v3)
View README.md
View .bash_profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management