Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • guap Friend
    #874407

    How do i display the image caption under full article?

    Ninja Lead Moderator
    #875181

    Hi,

    You can show the image caption as my solution below

    • Open templates/ja_magz/css/custom.css file and add new rule
    article p.img_caption {
        background: #eee;
        color: #666;
        font-size: 11px;
        width: 100%;
        margin: 0;
        padding: 5px;
        text-align: center;
        -webkit-box-sizing: border-box;
        -moz-box-sizing: border-box;
        box-sizing: border-box;
        clear: both;
    }
    • Open templates/ja_magz/html/com_content/article/default_text.php file

    find and change

    <img
        <?php if ($images->image_fulltext_caption): ?>
            <?php echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"'; ?>
        <?php endif; ?>
        src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>" itemprop="image" />

    to

    <img
        <?php if ($images->image_fulltext_caption): ?>
            <?php echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"'; ?>
        <?php endif; ?>
        src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>" itemprop="image" />
        <p class="img_caption"><?php echo $images->image_fulltext_caption;?></p>

    Hope it helps

    Regards

    guap Friend
    #875508

    It helps. Thanks you very much 🙂

Viewing 3 posts - 1 through 3 (of 3 total)

This topic contains 2 replies, has 2 voices, and was last updated by  guap 8 years, 4 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum