Skip to content

Instantly share code, notes, and snippets.

View byronjohnson's full-sized avatar
🧙

Byron Johnson byronjohnson

🧙
View GitHub Profile
@byronjohnson
byronjohnson / add-rel-nofollow-checkbox.php
Created May 18, 2022 18:59 — forked from danielbachhuber/add-rel-nofollow-checkbox.php
Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
<?php
/**
* Add a 'Add rel="nofollow" to link' checkbox to the WordPress link editor
*
* @see https://danielbachhuber.com/tip/rel-nofollow-link-modal/
*/
add_action( 'after_wp_tiny_mce', function(){
?>
<script>
@byronjohnson
byronjohnson / breadcrumbs-functions.php
Created November 5, 2020 19:43 — forked from tinotriste/breadcrumbs-functions.php
Wordpress: Breadcrumbs function
/*=============================================
= BREADCRUMBS =
=============================================*/
// to include in functions.php
function the_breadcrumb() {
$sep = ' > ';
if (!is_front_page()) {
@byronjohnson
byronjohnson / functions.php
Created September 25, 2019 14:28 — forked from mgibbs189/functions.php
Combine two facets' data source into one facet
<?php
/**
* This will trick FacetWP's indexer into indexing "tags_list" values for the "categories_new" facet
*
* Re-index after adding the following code into your (child) theme's functions.php
*/
add_filter( 'facetwp_index_row', function( $params, $class ) {
if ( 'tags_list' == $params['facet_name'] ) {
$params['facet_name'] = 'categories_new';