• Somehow Media-Attachments are an issue.

    ‘<p>
    [Shortcode]contents[shortcode]’
    the </p> gets lost and even if noticed and entered manually in the editor … it gets eaten.

    ‘[Shortcode]contents[shortcode]

    [Shortcode]contents[shortcode]’
    Absolutely empty post comes up. All there in the editor, no post content online (Titel is there, tags, edit etc at the bottom too – but other than that … empty

    Also, don’t know why (no programmer here) but the alignright and alignleft attachments worked fine … but the aligncenter did not.

    So here is my code and that works:
    in line 207 I added padding … otherwise the text would end up directly on the image – issue especially on floating right images:

    $html = '<img src="' . esc_attr($img_src) . '" alt="' . esc_attr($alt) . '" title="' . esc_attr($title).'" '.$hwstring.'class="'.$class.'" style="padding-left: 10px;" />';

    Line 597ff:

    return '<div ' . $id . 'class="' . $align . '" style="text-align:center;">'
    	. do_shortcode( $content ) . '<br /><span class="wp-caption-text" style="position:relative;width:'. $width . 'px;padding-left:10px; display:inline-block;text-align:left;"><small>' . $caption . '</small></span></div>';

    I am sure there is a more elegant way to solve this issue but know the Images get centered an I can align the caption underneath whereever I won’t left right centered.

    Krissy

Viewing 3 replies - 1 through 3 (of 3 total)
  • [Shortcode]contents[shortcode]

    Sorry… what shortcode are you referring to?

    the alignright and alignleft attachments worked fine … but the aligncenter did not

    Sounds like a CSS issue. Either .aligncenter hasn’t been declared in the theme stylesheet or it’s being superseded by later, or more specific, CSS.

    Thread Starter chartinael

    (@chartinael)

    caption shortcode …

    Thread Starter chartinael

    (@chartinael)

    an this is not a major issue as it has been worked around … however somehow the html-tags after the caption shortcode get eaten up and cause the page to come up blank if there is a linebreak between images

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[BUG] MEDIA Attachments WP2.8’ is closed to new replies.