load more portofolio page wanted

i want to put a load more in this code portfolio page, how can i do that? the pictures is big and the site is slow

<section class=”section white-section portfolio-padding-top-bottom-1″>
<div class=”container”>

</div>

<div id=”projects-grid”>

<?php if(have_posts()) : ?>

<?php

$args = array(

‘paged’ => $paged,

‘post_type’ => ‘portfolio’,

‘posts_per_page’ => -1

);

$wp_query = new WP_Query($args);

while ($wp_query -> have_posts()): $wp_query -> the_post();

$cates = get_the_terms(get_the_ID(),’categories’);

$cate_name =”;

$cate_slug = ”;

foreach((array)$cates as $cate){

if(count($cates)>0){

$cate_name .= $cate->name.’. ‘ ;

$cate_slug .= $cate->slug .’ ‘;

}

}

$video = get_post_meta(get_the_ID(),’_cmb_folio_video’, true);
$image = wp_get_attachment_url(get_post_thumbnail_id());

?>

<a href=”<?php if($video != ”){ echo esc_url($video); }else{ echo esc_url($image); } ?>” class=”group1 <?php if($video!= ”){ echo ‘vimeo1’; } ?>” title= “<?php the_title(); ?>”>
<div class=”portfolio-box-1 <?php echo esc_attr($cate_slug); ?>”>
<div class=”mask-1″></div>
<img src=”<?php echo esc_url($image); ?>” alt=”” title= “<?php the_title(); ?>”>
</div>
</a>
<?php endwhile;?>
<?php else: ?>
<h1><?php _e(‘Nothing Found Here!’, ‘pallas’); ?></h1>
<?php endif; ?>
</div>
<div>

Read more here:: load more portofolio page wanted

Leave a Reply

Your email address will not be published. Required fields are marked *