changing position of faculty list on the single department template

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support changing position of faculty list on the single department template

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #28723
    Sujoy Banerjee
    Participant

    Hi,
    On the single department page(single-department.php) , i need to show the Faculty list(just faculty image , faculty name and staff title) right below the contact information block instead of showing at the bottom of the page .
    I tried to customize the css from chrome dev tool but its not working out perfectly

    Can u please provide the required custom css for this

    see screenshot for details :

    #28747
    Raghavendra
    Moderator

    You will need to customize the single-department.php file. Custom CSS won’t help in moving content from one location of the page to another.

    You will need to move the code between lines 190 to 204 to line number 165 of single-department to make this work. You can override the template single-department.php in the child theme to prevent theme updates from overriding your customizations.

    #28749
    Sujoy Banerjee
    Participant

    ok, i have moved those lines of code . The faculty list r showing in the required position but they r overlapping each other because of the 4×4 coloums . May be it is possible to display them as 2×2 column .
    I guess now is the time for some custom css

    see the screenshot

    site url : http://glosoft.in/department/baisc-applied-science/

    #28751
    Raghavendra
    Moderator

    No need of custom CSS – you can modify the template to use the following code to include number_of_columns parameter –

                            $args = array(
                                'post_type' => 'staff',
                                'header_text' => __('Our Faculty', 'mo_theme'),
                                'display_summary' => true
                            );
                            $query_params = array(
                                'meta_key' => 'mo_department_for_staff',
                                'meta_value' => get_the_ID(),
                                'meta_compare'  => 'LIKE',
                                'orderby' => 'menu_order',
                                'order' => 'ASC',
                                'number_of_columns' => 2,
                            );
                            mo_display_custom_post_snippets($args, $query_params);
    #28753
    Sujoy Banerjee
    Participant

    sending 'number_of_columns' => 2, from child theme’s single-department.php won’t make them 2×2 column. Its only working if i set ‘number_of_columns’=2 on Default config options from post-functions.php page

    /** Default config options */
            $defaults = array(
                'header_text' => false,
                'show_meta' => false,
                'post_type' => 'post',
                'number_of_columns' => 2,
                'image_size' => "medium",
                'excerpt_count' => 80,
                'display_summary' => false
            );

    looks like the value of $number_of_columns is never getting updated with the $query_params value’s. value of $number_of_columns is always 4 because of $defaults

    Need to do this change from child theme

    #28787
    Sujoy Banerjee
    Participant

    any update on this ? how can i do the above changes from child theme

    #28800
    Raghavendra
    Moderator

    Sorry – I gave a slightly erroneous code to accomplish this – pls use –

    
                            $args = array(
                                'post_type' => 'staff',
                                'header_text' => __('Our Faculty', 'mo_theme'),
                                'display_summary' => true,
                                'number_of_columns' => 2,
                            );
                            $query_params = array(
                                'meta_key' => 'mo_department_for_staff',
                                'meta_value' => get_the_ID(),
                                'meta_compare'  => 'LIKE',
                                'orderby' => 'menu_order',
                                'order' => 'ASC'
                            );
                            mo_display_custom_post_snippets($args, $query_params);

    You can override the single-department.php in your child theme with the above changes. No other changes required.

    #28829
    Sujoy Banerjee
    Participant

    thanks 🙂

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.