Category-Sites

January 2012 WordPress Theme
GK User
Sat Dec 19, 2015 6:35 pm
Hi,

where can I set or change the design of category-list?
For example:
http://luftschubser.de/category/burgenregister/ is the list of castles I posted. But I'd like to have a different size of pics (thumbnails). Where can I change the whole thing, the posts are shown on the category-list?

Thanks
Alex
User avatar
Senior Boarder

GK User
Mon Dec 21, 2015 8:58 am
Hi,

Please check the Game/category.php file which loads the content-archive.php (here you can change the category layout).
User avatar
Moderator

GK User
Sun Jan 03, 2016 6:42 pm
Hi,

checked category.php and content-archive.php. But just can't find the settings where I can do some changes.
Maybe I didn't make clear what I'd like to change: I'd like to change the size of the images and also would like to change the exerpts: More words or letters. Isn't that in a css-file?
That's, because I'd like to create a landing page for a special category:
http://luftschubser.de/category/burgenregister/

I am using mainbody-top for showing all castles I described in a map.
I will ad below a few pages, like a portfolio, of some study of castles.

Than, the category list will follow.

So, either I can change the layout of the category-list or I need some other way to make a new landing page.

Do you have an idea?
User avatar
Senior Boarder

GK User
Sun Jan 03, 2016 7:21 pm
Hi,

Featured image size is defined in this line (content-archive.php file):
Code: Select all
<?php the_post_thumbnail('medium'); ?>

ref. https://codex.wordpress.org/Function_Re ... _thumbnail

but if you want to have another layout only for this category, you have to duplicate your category.php into category-burgenregister.php where the burgenregister is your category slug. In this file you have to change this line:
Code: Select all
<?php get_template_part( 'content-archive', get_post_format() ); ?>

to i.e.
Code: Select all
<?php get_template_part( 'content-archive-burgenregister', get_post_format() ); ?>

duplicate content-archive.php, change the file name to content-archive-burgenregister.php and add your modifications in this file (will be used only on your burgenregister category then).
User avatar
Moderator

GK User
Mon Jan 04, 2016 6:11 pm
Thanks for helping!!!
User avatar
Senior Boarder

GK User
Fri Jan 08, 2016 10:40 am
Hi Piotr,

I tried to change the image-size by using

<?php the_post_thumbnail('thumbnail'); ?> or <?php the_post_thumbnail( array(100, 100) ); ?>
but nothing changed.

I'd like to have the images at category-sites more in width than in height. Maybe like 500 x 300 for example.

And I'd like to have the_excerpt shown with more chars or words.

So how can I change both at content-archive.php?

Thanks for helping!
Alex
User avatar
Senior Boarder

GK User
Fri Jan 08, 2016 12:01 pm
Please check any other modifications - maybe this file is not used on your category at all (i.e. wrong category slug).

Regarding the image size - you can add new size in your functions.php file, please check this article:
https://developer.wordpress.org/referen ... mage_size/

after that you have to regenerate your thumbnails:
https://pl.wordpress.org/plugins/regenerate-thumbnails/

Generally this kind of modifications are a theme customization which is beyond our technical support.
User avatar
Moderator

GK User
Sat Jan 09, 2016 2:47 pm
Thank you Piotr.

Well, I am not a developer. Just having very low php-knowledge.
I read the articles you told me and so I tried like there is explained.
So, if the images are not resizeable on an easy way. I will let that pass.

But how can I enlarge the excerpt? More words?

Thank your very much.
User avatar
Senior Boarder

GK User
Sat Jan 09, 2016 6:33 pm
Guess I found some way:
I added
//the_excerpt custom version
function custom_excerpt_length( $length ) {
return 55;
}
add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

at function.php . That changed the amount of words. The first 55 words of the content are shown now.


cheers
Alex
User avatar
Senior Boarder


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