Display all portfolio items in one page

If you do not want to use pagination for your portfolio, but instead want all items displayed in one page. You can do that by editing the file \includes\core\codeless_routing.php

Find the lines:

if(!function_exists('codeless_set_portfolio_query')){
function codeless_set_portfolio_query()
{
global $cl_redata;

$terms = $cl_redata['portfolio_categories'];

$p_per_page = 6;
switch($cl_redata['portfolio_columns']){
case '1':
$p_per_page = 3;
break;
case '2':
$p_per_page = 2;
break;
case '3':
$p_per_page = 9;
break;
case '4':
$p_per_page = 12;
break;
case '5':
$p_per_page = 10;
break;
}

and replace with:

if(!function_exists('codeless_set_portfolio_query')){
function codeless_set_portfolio_query()
{
global $cl_redata;

$terms = $cl_redata['portfolio_categories'];

$p_per_page = 6;
switch($cl_redata['portfolio_columns']){
case '1':
$p_per_page = 999;
break;
case '2':
$p_per_page = 999;
break;
case '3':
$p_per_page = 999;
break;
case '4':
$p_per_page = 999;
break;
case '5':
$p_per_page = 999;
break;
}

Save file and refresh page!

Comments

comments

Was this article helpful?

Related Articles

Leave A Comment?