"staff" category appearance

Responsive WordPress theme suitable for Schools, Colleges or educational websites.
GK User
Sun Mar 01, 2015 9:06 am
Hi,

Can I change the appearance of the "staff" category so that there are more images visible before it creates a second page of "Older Posts"? Also, can I rename the "staff" category and/or create a second one that displays the pages in the category the exact same way?

Please see our webpage - http://tcballhockey.com/category/staff/

Ideally I would like a category for each team and be able to show all 25 players in each team on one screen, I would be okay with reducing the size of each image so 5 can fit on each row.

Thanks!
User avatar
Junior Boarder

GK User
Sun Mar 01, 2015 8:01 pm
Hi,

Numbers of posts you can change in Settings -> Reading and "Blog pages show at most" option (try to change to 25).
Try to add the following code to css/override.css file (first please enable this override option from Template Options -> Adnanced tab):
Code: Select all
#gk-mainbody.category-staff article {
   width: 20%;
}


to display 5 images per row.
User avatar
Moderator

GK User
Mon Mar 02, 2015 4:48 pm
Thanks Piotr!

That worked perfectly. Is there a way to add a second "staff" category to look the same. Also great to be able to rename the category from "staff" to "MTCPlayers" and "WTCPlayers". Ideally I would like to have a profile page for each team, in other words.

Cheers.
User avatar
Junior Boarder

GK User
Mon Mar 02, 2015 4:58 pm
Hi,

YOu can change the slug of this category, but then you should also change University/category-staff.php filename into category-newslug.php. It's also possible to duplicate this file and use another name for your other categories.
User avatar
Moderator

GK User
Tue Mar 03, 2015 5:04 am
Thanks again! That was easy :D
User avatar
Junior Boarder

GK User
Wed Mar 04, 2015 7:40 am
Sorry Piotr,

Another question, the content for the "new" category is not displaying in the same page format that "staff" uses. How can I make these new categories use or display in the same format? Right now the feature image is showing to big and I'd like it reduced in the same way as the staff page displays.

Also noticed that once I go beyond five profiles the second row only shows three instead of the same five on the first row. How can this be corrected?

Again the webpage can be found here: http://tcballhockey.com/category/wtcplayers/

Thanks
User avatar
Junior Boarder

GK User
Wed Mar 04, 2015 9:18 am
Try to add also this code to the and of override.css file:
Code: Select all
#gk-mainbody.category-staff article:nth-child(5n+1) {
    clear: both;
}
User avatar
Moderator

GK User
Wed Mar 04, 2015 4:34 pm
Thanks,

How about the content page for the new categories? How can I have these new "staff" categories use the same page layout as the original?

Is it just a matter of changing University/content-staff.php filename into content-newslug.php?

Examples:

Page using original "staff" category - http://tcballhockey.com/nathan-belliveau/

Page using new "staff" category (mtcplayers) - http://tcballhockey.com/samuel-beauchamp/

The picture for the new category is too big.

Regards.
User avatar
Junior Boarder

GK User
Fri Mar 06, 2015 9:19 am
Did you duplicate category-staff.php into category-mtcplayers.php, right? It should be enough, because this file uses content-staff.php file to display single view of the player, could you send me a PM with FTP access? I'll check the issue.
User avatar
Moderator

GK User
Thu Feb 25, 2016 9:26 am
I found that changing the SINGLE.PHP logic was needed

Code: Select all

      <?php elseif(in_category('staff')) : ?>
      <?php get_template_part( 'content', 'staff' ); ?>



And if I wanted to use the STAFF layout with the single page of a particular category added this to the logic for each that would use that template...

Code: Select all

      <?php elseif(in_category('sponsored')) : ?>
      <?php get_template_part( 'content', 'sponsored' ); ?>



Is this wrong?
User avatar
Fresh Boarder

Joshua M
Fri Feb 26, 2016 12:40 pm
Hello,

Yes, it should works properly. Do you have content-sponsored.php file, right? It's recommended to use a Child theme for this kind of modifications.
User avatar
Moderator


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.