{"id":18774249,"date":"2026-01-04T18:31:58","date_gmt":"2026-01-04T18:31:58","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/question-443\/"},"modified":"2026-01-04T18:31:58","modified_gmt":"2026-01-04T18:31:58","slug":"question-443","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/question-443\/","title":{"rendered":"Question!"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">I know this support is dead since long but I still give it a shot.. <\/p>\n\n\n\n<p class=\"wp-block-paragraph\">in the \/includes\/posts.php, on rows 96, 97, 98 I have this code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>                    $html .= '&lt;a class=\"arpw-title\" href=\"' . esc_url( get_permalink() ) . '\" rel=\"bookmark\"&gt;' . mb_strimwidth( get_the_title(), 0, 32, '...' ) . '&lt;\/a&gt;';<br \/>                    $html .= '&lt;span class=\"arpw-tags\"&gt;' . get_the_tag_list('&lt;p&gt; ',', ','&lt;\/p&gt;') . '&lt;\/span&gt;';<br \/>                    $html .= '&lt;span class=\"arpw-category\"&gt; ' . get_the_category_list(', ') . '&lt;\/span&gt;';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">where &#8220;0, 32&#8230;.&#8221; gives max characters for the title. I have noticed that some of the posts (its a movieblog) has several categories and I wanted to shorten it down but I dont know if its possible (just like the title). I tried insert this code instead:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\t\t\t\t\t\t$html .= '&lt;a class=\"arpw-title\" href=\"' . esc_url( get_permalink() ) . '\" rel=\"bookmark\"&gt;' . mb_strimwidth( get_the_title(), 0, 32, '...' ) . '&lt;\/a&gt;';<br \/>\t\t\t\t\t\t$html .= '&lt;span class=\"arpw-tags\"&gt;' . get_the_tag_list('&lt;p&gt; ',', ','&lt;\/p&gt;') . '&lt;\/span&gt;';<br \/>\t\t\t\t\t\t$html .= '&lt;span class=\"arpw-category\"&gt; ' . get_the_category_list(', ') . mb_strimwidth( get_the_category_list(), 0, 20, '...' ) . '&lt;\/span&gt;';<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">but it didnt work and Im sure I did something wrong there. If someone sees this, I would be happy if you could help me. There are to many categories on the posts so I only want to show the 3 or 4 first categories or do like the title, just shorten down the characters. <\/p>\n","protected":false},"template":"","class_list":["post-18774249","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18774249","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/18774249\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=18774249"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}