Support Forums for LiveMesh Themes & Plugins › Forums › Invent Theme Support › changing position of faculty list on the single department template
- This topic has 7 replies, 2 voices, and was last updated 6 years, 3 months ago by Sujoy Banerjee.
-
AuthorPosts
-
December 22, 2017 at 10:31 am #28723Sujoy BanerjeeParticipant
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 perfectlyCan u please provide the required custom css for this
see screenshot for details :
December 27, 2017 at 5:29 am #28747RaghavendraModeratorYou 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.
December 27, 2017 at 6:31 am #28749Sujoy BanerjeeParticipantok, 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 csssee the screenshot
site url : http://glosoft.in/department/baisc-applied-science/
December 27, 2017 at 2:03 pm #28751RaghavendraModeratorNo 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);
December 27, 2017 at 5:09 pm #28753Sujoy BanerjeeParticipantsending
'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
December 30, 2017 at 11:19 am #28787Sujoy BanerjeeParticipantany update on this ? how can i do the above changes from child theme
January 4, 2018 at 10:34 am #28800RaghavendraModeratorSorry – 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.
January 7, 2018 at 8:12 pm #28829Sujoy BanerjeeParticipantthanks 🙂
-
AuthorPosts
- The forum ‘Invent Theme Support’ is closed to new topics and replies.