Skip to content

Instantly share code, notes, and snippets.

@nicmare
Created October 1, 2025 11:58
Show Gist options
  • Save nicmare/9af6377b3f995904f81c5981dccc8d91 to your computer and use it in GitHub Desktop.
Save nicmare/9af6377b3f995904f81c5981dccc8d91 to your computer and use it in GitHub Desktop.
Blocksy: Remove Links from custom post cards
<?php
function change_layer_from_card($layer,$prefix,$image_args){
if($prefix != "unterstuetzer_archive") return $layer;
$layer["featured_image"] = sprintf('<div class="ct-media-container">%s</div>',strip_tags($layer["featured_image"],"<img>"));
$layer["title"] = strip_tags($layer["title"],"<h2>");
return $layer;
}
add_filter('blocksy:archive:render-card-layers',"change_layer_from_card",10,3);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment