How to limit Introtext in K2 while using multiple Categories

Tag: |   Category:

By default K2 Introtext limit will not work if you are using multiple categories in a Menu. To do this you need to change small code which is super easy...

Open 'category_item.php' and search for below code


<?php echo $this->item->introtext; ?>

Change/replace the above code with below code

<?php echo K2HelperUtilities::wordLimit($this->item->introtext, 15); ?>

15 is the word limit I gave, you can change the word limit to suit your need.

Copyright © 2024 Siam Naulak.
magnifiercrossmenu