Quantcast
Channel: Site5 Free Premium WordPress Themes » All Posts
Viewing all articles
Browse latest Browse all 8865

Problem with portfolio on homepage

$
0
0

Sorry, i don’t speak english very well.

I’ve a problem with portfolio on homepage. I would like to display 4 portfolio thumbnails on homepage but displays me 6 thumbnails. I changed in functions.php:
function portfolio_posts_per_page( $query ) {
if ( $query->query_vars['post_type'] == ‘portfolio’ ) $query->query_vars['posts_per_page'] = 6;
return $query;

on:

function portfolio_posts_per_page( $query ) {
if ( $query->query_vars['post_type'] == ‘portfolio’ ) $query->query_vars['posts_per_page'] = 4;
return $query;

but then displays also 4 thumbnails in “main portfolio” (full width portfolio). I want to display in ‘full width portfolio’ all portfolio item, what I add but on homepage only last 4 add item.

Please help :))


Viewing all articles
Browse latest Browse all 8865

Trending Articles