WordPress.org

Ready to get started?Download WordPress

Forums

Shadowbox JS
the_content breaks Shadowbox JS? (1 post)

  1. johnflufin
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/shadowbox-js/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.