Support » Plugin: Shadowbox JS » the_content breaks Shadowbox JS?

  • I’m using the following shortcode function to pull content from another post but it breaks Shadowbox’s ability to apply the rel attribute to the appropriate links.

    function digwp_includeContentShortcode( $atts ) {
              $thepostid = (int) $atts['postidparam'];
              if ( ! $post = get_post( $thepostid ) )
                   return '<em>Invalid post/page ID.</em>';
              return apply_filters( 'the_content', $post->post_content );
    add_shortcode("digwp_include", "digwp_includeContentShortcode");

    I’m guessing apply_filters is overriding SB plugin functionality but I’m not sure. In this post, the plugin author, Matt Martz, suggests that the_content should work whereas get_the_content may not. Obviously this is not the case here. Suggestions?

  • The topic ‘the_content breaks Shadowbox JS?’ is closed to new replies.