1

I'm trying to get my custom 'category_short_description' to appear within my loop but struggling to get this to appear. Anyone know how I can get this to display?

Product name is displaying but short description isn't? Where am I going wrong?

<?php 
if (!$block->getCategory()) {
    return;
}
$_categories = $block->getCategory()->getChildrenCategories();
$_count = is_array($_categories) ? count($_categories) : $_categories->count();
if ($_count) {
?>
    <div class="container">
        <ul class="list-quicklinks row med-gutter">
            <?php 
            foreach ($_categories as $_category) {
                if ($_category->getIsActive()) {
                    //print_r($_category);
                    ?>
                    <li class="col-sm-6 col-md-4">
                        <?php echo $block->escapeHtml($_category->getName()) ?>
                        <p><?php echo $_category->getData('category_short_description'); ?></p>
                    </li>
                    <?php 
                }
            }
            ?>
        </ul>
    </div>
<?php
}
?>
  • Any solutions about that? – mahmoudismail Jun 12 '18 at 9:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.