Skip to:
Content
Pages
Categories
Search
Top
Bottom

image formatting trouble

  • i logged in as admin, created a post, uploaded and inserted an image into my post using wp, and added a caption to the image.

    in the “recent blog posts” and “site wide activity” widget on the homepage, i now get formatting like this >

    [caption id="attachment_15" align="alignleft" width="150" caption="julene"][/caption]

    it doesnt seem to ignore the image and move on to display the text. instead it includes the formatting.

    in addition, on the news page where this blog is shown, it does display the image but does not show the formatting.

    any ideas?

Viewing 2 replies - 1 through 2 (of 2 total)

  • oceandoctor
    Member

    @oceandoctor

    I’m experiencing the same problem. In addition, the align formatting doesn’t work, so no matter whether I specify left, right, etc., I get default.


    Burt Adsit
    Participant

    @burtadsit

    @kellylind I’m not running the home theme but it sounds to me like that is what happens with an excerpt that isn’t being filtered completely. The recent blog posts widget displays an excerpt. It’s not stripping the [caption][/caption]s because bp uses the standard wp striptags() function.

    If you are the adventurous type I found this on the wp forums. Same problem you have.

    $text = preg_replace( '|[(.+?)](.+?[/\1])?|s', '', $text )

    Looks like it’ll work. Ya gotta mod the bp core to get it to work though. I’ll put in a ticket for this in Trac. You can wait or you can modify bp_create_excerpt() in bp-core.php.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘image formatting trouble’ is closed to new replies.
Skip to toolbar