• Hello,

    This is an urgent question, can I transfer image caption from below image which is the default at a point over image?

Viewing 11 replies - 1 through 11 (of 11 total)
  • is this for all images with captions?

    if you can make sure the caption stays in only one line, try to add something like this to style.css:

    .wp-caption{position:relative;padding-top:20px;}
    .wp-caption p { position:absolute; top:0;}

    (might not work, as it depends on the other styles of your theme)

    Thread Starter giankar

    (@giankar)

    Didn’t work, my other css about caption is:

    caption { background: #ffffff; font-size: 19pt; margin-bottom: 10em; text-align: left; }

    a.wp-caption p, a.wp-caption:hover p, .wp-caption p.wp-caption-text, .full-image-caption {
    font-size:31px !important;
    }

    here is a more complex way of showing the image caption at the top of the image:

    add this to functions.php of your theme:

    https://pastebin.com/sPJmnB1t

    Thread Starter giankar

    (@giankar)

    OK I added this but no difference, should I call these new functions somewhere?

    no, this should replace the default caption code automatically.

    but, all themes are different, and it is impossible to predict if there is some other code that might be overwriting the function.

    what theme are you using?

    Thread Starter giankar

    (@giankar)

    I’m using BLANK-Theme by Anonymous

    i have trouble locating a download for the theme.
    is it a free theme?

    if so, can you post a download link for the blank theme?

    are you using the ‘normal’ captions?
    such as typing some text into the ‘caption’ field when inserting an image?
    link to your site?

    Thread Starter giankar

    (@giankar)

    thanks for the info –

    changing caption position works with the fresh download of the theme (wp3.1.1, wampp local test blog)
    (added at the end of functions.php of the theme)

    that is unfortunately all, i can do.

    you don’t have any caches installed or activated?

    how do the captions look like now?
    link to your site?

    Thread Starter giankar

    (@giankar)

    This is how they look: https://demo.affiliatenews.gr/

    I don’t use any cache

    I really appreciate your help!

    i can see the problem:
    for some reason you have this code, which is quite different from a ‘normal’ caption code:

    <div class="mceTemp">
    <dl class="wp-caption alignnone" style="width: 737px;">
    <dt class="wp-caption-dt"><img title="kor" src="https://www.nuked.gr/images/level1/alexpolis-camera.jpg" alt="" width="727" height="545" /></dt>
    <h1 class="wp-caption-dd"><span style="color: #ffffff; background-color: #0076fb;"> ΑΛΕΞΑΝΔΡΟΥΠΟΛΗ </span></h1>

    also, the caption text is in h1 tags.

    (i always interprete the ‘mceTemp’ class as sign that something gone wrong in the post editor.)

    you could try and re-write the post/page content (?)

    -this is very much the end of what can think of ??

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Image Caption over image’ is closed to new replies.