Forums

WordPress gallery incompatible with Advanced Excerpt (3 posts)

  1. archon810
    Member
    Posted 2 years ago #

    The new [gallery] support in WordPress 2.9 is actually incompatible with Advanced Excerpt because it adds <style> tags inline into the post content. The problem is, Advanced Excerpt by default strips <style> tags, so one is left with the contents of the <style> tag (CSS) as plain text.

    Ticket #10734 http://core.trac.wordpress.org/ticket/10734 mentions this.

    A partial workaround is to modify wp-includes/kses.php and add 'style' to the list, then check it in Advanced Excerpt's configuration, so that it doesn't strip the <style> tags.

    Another workaround is to use the plugin mentioned earlier in the ticket: http://wordpress.org/extend/plugins/gallery-shortcode-style-to-head/.

    I am quite shocked, frankly, that the gallery does something this irresponsible. Entirely not Advanced Excerpt's fault.

    This can be considered semi-fixed, pending the final changes to the gallery.

    http://wordpress.org/extend/plugins/advanced-excerpt/

  2. basvd
    Member
    Posted 2 years ago #

    The upcoming version of Advanced Excerpt will strip shortcodes, removing both the gallery and the problem from the equation.

  3. archon810
    Member
    Posted 2 years ago #

    I don't know if it's the best approach - consider posts that only have something within a shortcode (such as the gallery). You could potentially end up showing nothing or missing a large chunk of content.

Topic Closed

This topic has been closed to new replies.

About this Topic