-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
37 lines (20 loc) · 696 Bytes
/
page.php
File metadata and controls
37 lines (20 loc) · 696 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php get_header(); ?>
<!-- page.php -->
<div class="page portfolio">
<?php while ( have_posts() ) : the_post(); ?>
<section <?php post_class(); ?>>
<?php
$searchpattern = '~<img [^>]* />~';
preg_match_all( $searchpattern, $post->post_content, $pics );
$count_pics = count( $pics[0] );
if ( has_post_thumbnail() && 1 > $count_pics && !has_shortcode( $post->post_content, 'gallery' ) ) :
get_template_part( 'inc/content', 'feature' );
endif;
?>
<div class="loop row">
<?php get_template_part( 'inc/content', 'text' ); ?>
</div><!-- post -->
</section>
<?php endwhile; ?>
</div><!-- page portfolio -->
<?php get_footer(); ?>