Skip to content

Instantly share code, notes, and snippets.

@mgibbs189 mgibbs189/functions.php
Last active Jan 23, 2019

Embed
What would you like to do?
FacetWP + Co-authors plus
<?php
// Add the following to your (child) theme's functions.php
add_filter( 'facetwp_facet_sources', function( $sources ) {
if ( class_exists( 'coauthors_plus') && isset( $sources['taxonomies']['choices']['tax/author'] ) ) {
$sources['co_authors'] = array(
'label' => __( 'Co-Authors', 'co-authors-plus-for-facetwp' ),
'choices' => array(
'tax/author' => __( 'Authors', 'co-authors-plus-for-facetwp' ),
)
);
unset( $sources['taxonomies']['choices']['tax/author'] ); // remove the duplicate
}
return $sources;
}, 10 );
@yayaenan

This comment has been minimized.

Copy link

yayaenan commented Jan 4, 2019

how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.