foreach ($fold in $folder2)
{
$tmp = $fold.split(".")[0]
$tmp2 = $folder1 | Where-Object {$_ -like "*$tmp*"}
$tmp3 = $fold.split(".")[-1]
$newname = "$tmp2.$tmp3"
Rename-Item -path "$dir2\$fold" $newname
<?php
/**
* Template part for displaying results in search pages.
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package veni
*/
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="search-post-type">
<?php echo get_post_type() == 'portfolio' ? esc_html__( 'portfolio', 'veni' ) : get_post_type(); ?>
</div>
<?php veni_featured_image(); ?>
<?php if ( 'link' == get_post_format() || 'quote' == get_post_format() ) : ?>
<div class="holder-icon">
<?php the_content(); ?>
</div>
<?php else : ?>
<a href="<?php echo esc_url( get_permalink() ); ?>">
<?php the_title( '<h2>', '</h2>' ); ?>
</a>
<?php endif; ?>
<div class="entry-header">
<div class="side-meta">
<div class="entry-meta">
<?php veni_posted_on(); ?>
</div><!-- .entry-meta -->
<div class="entry-meta">
<?php veni_entry_footer(); ?>
</div><!-- .entry-meta -->
</div><!-- .side-meta -->
</div>
</article><!-- #post-## -->