I tried that, but got an error because the function already excisted. But I might have done it the wrong way. I’m not a programmer. Is this what is supposed to be in the functions.php?
<?php
/***************
PROJECTS
***************/
function vires_portfolio_list() {
global $post, $portfolio_page_url;
if(get_option('vires_portfolio_hide')!="true") {
?>
<!--PROJECTS-->
<section class="home-projects">
<div class="inside project-block clear">
<h2><?php if(get_option('vires_hportfolio_header')!="") { echo get_option('vires_hportfolio_header'); } else { _e( 'Featured Work', LABOR_THEME_NAME ); } ?></h2>
<a href="https://buschagency.dk/authors/" class="view-all">
<?php if(get_option('vires_portfolio_link')!="") { echo get_option('vires_portfolio_link'); } else { _e( 'View All', LABOR_THEME_NAME ); } ?>
</a>
<div class="horScroll">
<ul class="clear">
<?php
$album_order = get_option('vires_album_order');
$album_orderby = get_option('vires_album_orderby');
$album_limit = get_option('vires_num_hportfolio');
$args = array( 'post_type' => 'portfolio', 'orderby' => $album_orderby, 'order' => $album_order, 'posts_per_page' => $album_limit, 'meta_query' => array( array( 'key' => 'exclude', 'value' => 'on', 'compare' => '!=' ) ) );
$wp_query = new WP_Query( $args );
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<li id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="pimage">
<a href="<?php the_permalink(); ?>" target="_blank">
<?php if ( has_post_thumbnail() ) { the_post_thumbnail(); } ?>
</a>
<div class="project-mask">
<a href="<?php the_permalink(); ?>">
<?php if(get_option('vires_item_link')!="") { echo get_option('vires_item_link'); } else { _e( 'View Project', LABOR_THEME_NAME ); } ?>
</a>
</div>
</div>
<h5>
<?php the_title(); ?>
<?php if( function_exists('zilla_likes') ) zilla_likes(); ?>
</h5>
</li>
<?php
endwhile;
?>
</ul>
</div>
</div>
</section>
<?php
}
}
?>