different No. of columns in a specific categories

Home Forums WordPress Theme CityBook – Directory & Listing WordPress Theme different No. of columns in a specific categories

This topic contains 7 replies, has 2 voices, and was last updated by  CTHthemes 3 months, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #34779

    Most-Oman-Team
    Participant

    Supported

    Hi mate

    As the title states, do you have a code to customize these?

    Regards, Amru

    #34811

    CTHthemes
    Keymaster

    Sorry, I don’t understand your question well. Would you send me a screenshot? It will be very helpful

    #34866

    Most-Oman-Team
    Participant

    Supported

    Hi,

    (pls find the attachment)

    I mean a different number of listing column in some categories

    Looking forward to your replay
    Regards, Amru

    #34895

    CTHthemes
    Keymaster

    There is no attachment

    #34952

    Most-Oman-Team
    Participant

    Supported

    Hi

    sorry, pls find the attachments https://photos.app.goo.gl/DWS2xePWbfrYkUdm8

    #34971

    CTHthemes
    Keymaster

    You can change columns from citybook add-ons settings: http://prntscr.com/ote06j

    and for different category:

    
    add_filter( 'cth_addons_option_value', function($value, $name){
        if( $name == 'columns_grid' && is_tax( 'listing_cat' ) &&  get_queried_object_id() == 100 ){
            $value = '3';
        }
        return $value;
    }, 10, 2 );
    
    #34995

    Most-Oman-Team
    Participant

    Supported

    Hi

    It didn’t work. 🙁

    I did it like this:

    add_filter( ‘cth_addons_option_value’, function($value, $name){
    if( $name == ‘columns_grid’ && is_tax( ‘listing_cat’ ) && get_queried_object_id() == 132 ){
    $value = ‘5‘;
    }
    return $value;
    }, 10, 2 );

    #35021

    CTHthemes
    Keymaster

    Send me the category page to check.

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

You must be logged in to reply to this topic.

New featues: CityBook - Listing & Directory WordPress Theme version 2.1.8 was outUpdate now
+