We're merging with GenerateBlocks! Learn more here.

Support Forum

Please login to receive premium support.

Support for the free plugin can be found here.

Home Forums Pro Support Option to disable permalinks Reply To: Option to disable permalinks

#2146
Addison
Participant

Just wanted to report back and say that the wpsp_disable_image_link filter in the dev version worked great. Here’s what I did in my functions.php to target my shortcode:


add_filter( 'the_content', 'gpc_alter_wpshowposts' );
function gpc_alter_wpshowposts( $content ) {
  if ( strpos( $content, '[wp_show_posts id="1746"]') !== false ) {
    add_filter( 'wpsp_disable_image_link', 'gpc_disable_wpshowposts_link' );
  }
  return $content;
}
function gpc_disable_wpshowposts_link() {
  return true;
}

I’d love to see additional filters to shut off all links, or perhaps a disable-all-links filter down the road… Thanks!