Shadowbox JS
the_content breaks Shadowbox JS? (1 post)

  1. johnflufin
    Posted 2 years ago #

    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?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Shadowbox JS
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.