Title: Shortcode breaks Shadowbox
Last modified: August 20, 2016

---

# Shortcode breaks Shadowbox

 *  [johnflufin](https://wordpress.org/support/users/johnflufin/)
 * (@johnflufin)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/shortcode-breaks-shadowbox/)
 * The following shortcode function to pull content from another post breaks Shadowbox’s
   ability to apply the rel attribute to the appropriate links. I’m guessing apply_filters
   is overriding SB plugin functionality but I’m not sure. Suggestions?
 *     ```
       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");
       ```
   
 * [http://wordpress.org/extend/plugins/shadowbox-js/](http://wordpress.org/extend/plugins/shadowbox-js/)

The topic ‘Shortcode breaks Shadowbox’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/shadowbox-js.svg)
 * [Shadowbox JS](https://wordpress.org/plugins/shadowbox-js/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/shadowbox-js/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/shadowbox-js/)
 * [Active Topics](https://wordpress.org/support/plugin/shadowbox-js/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/shadowbox-js/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/shadowbox-js/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [johnflufin](https://wordpress.org/support/users/johnflufin/)
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/shortcode-breaks-shadowbox/)
 * Status: not resolved