Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • iamwe361 Friend
    #760659

    I would like to display a K2 Extra field instead of the Hits for the article. How can I change this?
    See red section in image.
    Thanks for your help.

    Adam M Moderator
    #761596

    Hi @iamwe361,

    You can open file templatesja_wallhtmlcom_k2ja_wallcategory_item.php and look for this line :

    <div class="footer item-footer clearfix">

    This is open tag for the block footer where contains readmore link and hits. By default, the code to output K2 extra fields is as below :

    <?php if($this->item->params->get('itemExtraFields') && count($this->item->extra_fields)): ?>
    <!-- Item extra fields -->
    <div class="itemExtraFields">
    <h3><?php echo JText::_('K2_ADDITIONAL_INFO'); ?></h3>
    <ul>
    <?php foreach ($this->item->extra_fields as $key=>$extraField): ?>
    <?php if($extraField->value != ''): ?>
    <li class="<?php echo ($key%2) ? "odd" : "even"; ?> type<?php echo ucfirst($extraField->type); ?> group<?php echo $extraField->group; ?>">
    <?php if($extraField->type == 'header'): ?>
    <h4 class="itemExtraFieldsHeader"><?php echo $extraField->name; ?></h4>
    <?php else: ?>
    <span class="itemExtraFieldsLabel"><?php echo $extraField->name; ?>:</span>
    <span class="itemExtraFieldsValue"><?php echo $extraField->value; ?></span>
    <?php endif; ?>
    </li>
    <?php endif; ?>
    <?php endforeach; ?>
    </ul>
    <div class="clr"></div>
    </div>
    <?php endif; ?>

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

This topic contains 2 replies, has 2 voices, and was last updated by  Adam M 8 years, 11 months ago.

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