Skip to content

Instantly share code, notes, and snippets.

@cliffordp cliffordp/functions.php
Last active Jan 6, 2019

Embed
What would you like to do?
Divi theme: Remove the link to each Portfolio item within Filterable Portfolio.
<?php
/**
* Divi theme: Remove the link to each Portfolio item within Filterable Portfolio.
*
* @link https://gist.github.com/cliffordp/e6dfd8c9533ae4b31d4c3b8ffb6dce8d This snippet.
*/
add_action( 'wp_footer', function () {
if ( ! class_exists( 'ET_Builder_Module_Filterable_Portfolio' ) ) {
return;
}
wp_enqueue_script( 'jquery' );
?>
<script>
jQuery( 'div.et_pb_portfolio_items' ).each( function () {
jQuery( this ).find( 'a' ).replaceWith(
function () {
return jQuery( this ).contents();
}
);
} );
</script>
<?php
} );
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.