Skip to content

Instantly share code, notes, and snippets.

View RavanH's full-sized avatar

Rolf Allard van Hagen RavanH

View GitHub Profile
@RavanH
RavanH / rank-math-polylang.php
Last active April 6, 2024 23:11
Rank Math Polylang compatibility
<?php
add_action(
'pll_init',
function() {
defined( 'RANK_MATH_VERSION' ) && class_exists( 'PLL_Integrations' ) && PLL_Integrations::instance()->rankmath = new PLL_RankMath();
}
);
/**
@RavanH
RavanH / blogs-menu.php
Last active September 20, 2017 23:35
WordPress Multisite: List of all blogs
<?php
function projects_menu( $atts = array() ) {
global $wpdb, $blog_id;
$a = shortcode_atts( array(
'link_self' => false,
'format' => 'ul', // ol, dl... TODO
'slogan' => false, // TODO
'sort_by' => 'title', // or ID TODO