Skip to content

Instantly share code, notes, and snippets.

Avatar

Marco Michely Jehu

View GitHub Profile
@Jehu
Jehu / functions.php
Created December 13, 2022 12:22
SEOPress manual FAQ Schema + Metabox.io – Use related custom FAQ post type
View functions.php
/**
* 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
@Jehu
Jehu / splitmenu.php
Last active February 16, 2022 12:40
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 February 8, 2022 16:09
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 February 8, 2022 16:07
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 June 15, 2022 08:51
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 07:28
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 February 28, 2020 07:41
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 November 29, 2019 09:56
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 January 18, 2017 16:03 — forked from anonymous/README.md
basic navigation component with marko (v4) and koa (v3)
View README.md