Skip to content

Instantly share code, notes, and snippets.

View Jehu's full-sized avatar

Marco Michely Jehu

View GitHub 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
@Jehu
Jehu / README.md
Last active January 18, 2017 16:03 — forked from anonymous/README.md
basic navigation component with marko (v4) and koa (v3)

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 / plugin.php
Last active November 29, 2019 09:56
Use Groundhogg contact fields inside WPForms as smart tags
<?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!' );
@Jehu
Jehu / functions.php
Last active February 28, 2020 07:41
Set hreflang="x-default" for WP Globus WordPress Plugin
<?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 / mySidebarPlugin.php
Created May 1, 2021 07:28
WordPress Custom Sidebar
<?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 / image_sizes.php
Created February 8, 2022 16:07
WordPress - Additional Image Sizes
<?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 / shortcode_year.php
Created February 8, 2022 16:09
WordPress - Jahreszahl Shortcode
<?php
function year_shortcode () {
$year = date_i18n ('Y');
return $year;
}
add_shortcode ('year', 'year_shortcode');
@Jehu
Jehu / splitmenu.php
Last active February 16, 2022 12:40
WordPress: Menu for Child pages (Split Menu)
<?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 / functions.php
Created December 13, 2022 12:22
SEOPress manual FAQ Schema + Metabox.io – Use related custom FAQ post type
/**
* FAQ Schema.org for MetaBox Relationship if manual FAQ Schema is active
*
* @See https://www.seopress.org/support/hooks/filter-manual-faq-schema/
*/
add_filter('seopress_pro_get_json_data_faq','sp_pro_schema_faq_json', 10, 2);
function sp_pro_schema_faq_json($json, $context)
{
$relationship_id = 'faq-page'; // Replace with your Relationship ID