Change category icons on detail page

This topic contains 17 replies, has 3 voices, and was last updated by  Kor 6 years, 10 months ago.

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

Open Support Ticket

Tagged: ,

  • Author
    Posts
  • #411319

    Tilen
    Expired Member
    Post count: 120

    Hello,

    thanks for help – I will try.

    T

    #411320

    Tilen
    Expired Member
    Post count: 120

    Hello,

    thanks for help -I will try.

    T

    #411398

    Kor
    Moderator
    Post count: 16516

    Hi Tilen,

    Just received a response from a developer and he shared the code below. Could you give it a try and see if it’s what you’re looking for?

    
    
    // Change category icon on detail page
    function _gd_custom_detail_page_category_icon( $terms_icons, $term_id ) {
        if ( ! empty( $terms_icons ) && ( geodir_is_page( 'detail' )  || geodir_is_page( 'preview' ) ) ) {
             // $terms_icons['TERM_ID'] = 'CATEGORY ICON URL';
             $terms_icons['946'] = 'http://mysite.com/wp-content/uploads/2018/01/new-hospital-icon.png';
        }
        return $terms_icons;
    }
    add_filter( 'geodir_get_term_icons', '_gd_custom_detail_page_category_icon', 10, 2 );
Viewing 3 posts - 16 through 18 (of 18 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