Popular Post Category Widget

This topic contains 6 replies, has 2 voices, and was last updated by  Paolo 9 years ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #124180

    Sara Graybill
    Buyer
    Post count: 18

    I have included the popular post category widget at the top of this page http://utilitymarketconnections.com/service-providers/.

    The problem is the capitalization of the categories does not match the capitalization under the CPT categories where I added them. Where does it pull the categories from and why would it be different from the categories I added?

    #124239

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    Please be more specific, we can’t see how you added them so we don’t understand the problem.

    Thanks

    #124270

    Sara Graybill
    Buyer
    Post count: 18

    Sorry, that was pretty vague. On that page it lists all the categories I’ve add under the Solutions Providers CPT (Through Solution Providers > Categories). When I added them as a category I’ve made sure that all the acronyms inside of the parentheses were all uppercase. Now on http://utilitymarketconnections.com/service-providers/ the acronyms aren’t all uppercase like they were when I added them. And I’m not sure where it’s is pulling that information from to change that. Does that make more sense?

    #124277

    Paolo
    Site Admin
    Post count: 31211

    Yes that makes much more sense.

    The popular category widget is using geodir_ucwords to capitalize the 1st letter of each word of category names.

    I’ve asked to the developers if there is an easy way to do this.

    We’ll let you know asap.

    Thanks

    #124350

    Paolo
    Site Admin
    Post count: 31211

    Actually we decided to remove that capitalization so it will output the same format entered.

    You can patch your install modifying this line of geodirectory-functions/general_functions.php

    Search this:

    echo '<img alt="' . esc_attr($cat->name) . ' icon" style="height:20px;vertical-align:middle;" src="' . $term_icon_url . '"/> <span class="cat-link">'; echo geodir_ucwords($cat->name) . '</span> <span class="geodir_term_class geodir_link_span geodir_category_class_' . $post_type . '_' . $cat->term_id . '">(' . $total_post . ')</span> ';

    and replace it with:

    
    
    
    echo '<img alt="' . esc_attr($cat->name) . ' icon" style="height:20px;vertical-align:middle;" src="' . $term_icon_url . '"/> <span class="cat-link">'; echo $cat->name . '</span> <span class="geodir_term_class geodir_link_span geodir_category_class_' . $post_type . '_' . $cat->term_id . '">(' . $total_post . ')</span> ';

    Should be line 2454.

    Next release will have this included, so you won’t have to worry about updates.

    Thanks

    #125892

    Sara Graybill
    Buyer
    Post count: 18

    Can you double check that it is in the general_functions.php file? I’ve searched that file and can’t find that code.

    #125898

    Paolo
    Site Admin
    Post count: 31211

    Hi,

    100% sure, I just checked again.

    Try searching for:

    echo '<img alt="' . $cat->name

    Thanks

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

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount