page layout must look like category layout

March 2014 WordPress Theme
GK User
Sat Jun 28, 2014 7:13 pm
How can i make a page layout the same as a category layout?

i want my homepage layout which must be a page look like a category page
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 7:55 am
Hi,

Unfortunately for the homepage, you can select only 1, 2, or 3 columns layout - you can select this opiton from Template Options -> Features tab and "Columns for other archive views".
User avatar
Moderator

GK User
Mon Jun 30, 2014 8:19 am
No. I mean.....i want to choose a category as homepage instead of a page as homepage
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 8:29 am
Ok, I understand now, but you can use only latest posts or a static page as a homepage in wordpress.

You can e.g. use static page - use page with template - latest posts and let me know which category you want to display on the homepage (category id or slug) and then I'll help you to change this latest post template to display only posts from one category.
User avatar
Moderator

GK User
Mon Jun 30, 2014 8:38 am
yes. that's the problem....on the mainpage/homepage i want not to show latest post but a category

category i want to show = ID=1

http://www.businessupdates.nl/wp-admin/ ... _type=post
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 9:02 am
Try to edit News2/template.latest.php file and replace this fragment :
Code: Select all
query_posts('posts_per_page=' . $per_page . '&paged=' . $paged );

with:
Code: Select all
query_posts( array ( 'category_name' => 'sport', 'posts_per_page' => 6 ) );


instead of 'sport' use your category slug, and instead of 6 (posts_per_page) use your own value for amount of posts displayed per one page.
User avatar
Moderator

GK User
Mon Jun 30, 2014 9:22 am
yes. that's the one. Fantastic!!!

Thanks
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 1:00 pm
Piotr Kunicki wrote:Try to edit News2/template.latest.php file and replace this fragment :
Code: Select all
query_posts('posts_per_page=' . $per_page . '&paged=' . $paged );

with:
Code: Select all
query_posts( array ( 'category_name' => 'sport', 'posts_per_page' => 6 ) );


instead of 'sport' use your category slug, and instead of 6 (posts_per_page) use your own value for amount of posts displayed per one page.




Piotr,

It's getting better all the time and makes me happy.

now im pretty sure i have more then 5 related articles but your theme always only shows 4....why not 5

see visual


businessupdates logo.jpg
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 2:37 pm
It's probably set to display 4 articles, try to edit layouts/content.post.footer.php file and replace in this fragment:

Code: Select all
         $args = array(
               'tag__in' => $tags_ids,
               'post__not_in' => $exclude,
               'posts_per_page' => 4
               );


posts_per_page value.
User avatar
Moderator

GK User
Mon Jun 30, 2014 2:42 pm
that's the one. This looks awesome! Thanks again Piotr
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 3:07 pm
Also Piotr.....how to only show the title of the article in the highlights section?

highlights.jpg
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 9:12 pm
There's only "text length" option in this widget options, so you can change this value (highlighter options tab), bu if you'll have short title in some of your articles - the content will be aslo visible.
User avatar
Moderator

GK User
Mon Jun 30, 2014 9:21 pm
mmm.

other question. I have made quite a few changes in some templates. If the theme comes with an update......i have to change the stuff i did again?
User avatar
Senior Boarder

GK User
Mon Jun 30, 2014 11:16 pm
Hi Piotr,

when scrolling down on the site/pages/categories......still screen flickering and hickups......quite annoying for the reader
User avatar
Senior Boarder

GK User
Tue Jul 01, 2014 7:35 am
Hi,

Which browser and OS are you using? because I can't see this flickering. Regarding the updates, are you using Child Theme? If not you'll probably have to make you changes again, or you can make an update manually (there's always a changelog with the changed filenames).
For the CSS you should always use override.css file - there's no problem to copy this file and restore after the update. Please check this article abouth Child Themes:

http://www.gavick.com/documentation/wor ... ld-themes/
User avatar
Moderator

GK User
Tue Jul 01, 2014 7:46 am
use the latest version of chrome

about the child theme...no i do not use it......i did not see it in the news2 zip package.

i always use override.css

but i had to made changes in the php files as you told me
User avatar
Senior Boarder

GK User
Tue Jul 01, 2014 8:56 am
Child theme is included only in the quickstart package - or you can create it, it's very simple.
Or you'll have to make your changes again after the update- it's your choice.

Regarding the flickering problem, could you provide o screenshot - which elements flicks exactly, we are not talking about the hover effect from featured images on the homepage, right?
User avatar
Moderator

GK User
Tue Jul 01, 2014 9:02 am
ok. with the child theme i will figure this out

about the flickering/hickup. this is only when i'm scrolling down on a post category with articles....when i scroll from the sidebar position it does not flicker, when scrolling down with my mouse in the center of the post category with articles it happens.....screenshot is difficult but i can make a screencast.
User avatar
Senior Boarder

GK User
Tue Jul 01, 2014 9:23 am
we cannot go live with the site until this big issue is solved Piotr bacause its a true issue
User avatar
Senior Boarder

GK User
Tue Jul 01, 2014 1:54 pm
I understand, but can't see this issue on my browser. Please check our demo website http://gavick.com/demo/wordpress/news2/ it's also the same problem?

Try to also add this code into override.css file:

Code: Select all
article figure.featured-image:hover img,
article figure.featured-image img {
-webkit-transform: none;
-moz-transform: none;
-ms-transform: none;
-o-transform: none;
-webkit-transform: none);
}
User avatar
Moderator

GK User
Tue Jul 01, 2014 2:33 pm
on demo site no problems

i already put the code in override.css a while ago.

I will try some other things
User avatar
Senior Boarder


cron