Forums

Image Caption Style - (3 posts)

  1. Zuwxiv
    Member
    Posted 3 years ago #

    There's a function in the Media.php file which does:
    "Allow plugins/themes to override the default caption template."

    But I don't want this to happen - the captions are looking like plain text and part of the blog entree. Is there a quick way to avoid this? I tried messing with the code a bit, but didn't manage to do much. (Not experienced at all with php)

    Basically, I want image captions to be in a different style text, preferably with a content box around them, like it is by default. (Some themes also seem to override the formatting of the image - not showing up centered, etc.)

    Thanks in advance, any help is greatly appreciated!

  2. Zuwxiv
    Member
    Posted 3 years ago #

    Is there anything in the themes code that changes this? I've been looking and can't find it....

    Sorry for the bump. :(

  3. silverdoves
    Member
    Posted 2 years ago #

    I was having trouble with this, as well and this is what I found. With the theme I was using it was missing the default style for captions so I had to go into the style.css for the theme and add this:

    .wp-caption {
    border: 1px solid #ddd;
    text-align: center;
    background-color: #f3f3f3;
    padding-top: 4px;
    margin: 10px;
    -moz-border-radius: 3px;
    -khtml-border-radius: 3px;
    -webkit-border-radius: 3px;
    border-radius: 3px;
    }
    .wp-caption img {
    margin: 0;
    padding: 0;
    border: 0 none;
    }
    .wp-caption p.wp-caption-text {
    font-size: 11px;
    line-height: 17px;
    padding: 0 4px 5px;
    margin: 0;
    }

    This is the site where I finally found out how to do this.

Topic Closed

This topic has been closed to new replies.

About this Topic