Multiple other required fixes

This commit is contained in:
Alexander Agnarson 2018-09-08 16:49:15 +02:00
parent 3bfba71a44
commit fa84dcfb45
9 changed files with 60 additions and 114 deletions

View file

@ -6,8 +6,8 @@ $featured = new WP_Query(
'update_post_meta_cache' => false,
'update_post_term_cache' => false,
'ignore_sticky_posts' => 1,
'posts_per_page' => get_theme_mod('featured-posts-count','3'),
'cat' => get_theme_mod('featured-category','')
'posts_per_page' => absint( get_theme_mod('featured-posts-count','3') ),
'cat' => absint( get_theme_mod('featured-category','') )
)
);
?>

View file

@ -6,8 +6,8 @@
$caption = get_post(get_post_thumbnail_id())->post_excerpt;
$description = get_post(get_post_thumbnail_id())->post_content;
echo '<div class="page-image-text">';
if ( isset($caption) && $caption ) echo '<div class="caption">'.$caption.'</div>';
if ( isset($description) && $description ) echo '<div class="description"><i>'.$description.'</i></div>';
if ( isset($caption) && $caption ) echo '<div class="caption">'.esc_html( $caption ).'</div>';
if ( isset($description) && $description ) echo '<div class="description"><i>'.esc_html( $description ).'</i></div>';
echo '</div>';
?>
</div>

View file

@ -35,13 +35,13 @@
<h1><i class="fa fa-tags"></i><?php esc_html_e('Tagged:','blogrow'); ?> <span><?php echo single_tag_title('', false); ?></span></h1>
<?php elseif ( is_day() ): ?>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Daily Archive:','blogrow'); ?> <span><?php echo get_the_time('F j, Y'); ?></span></h1>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Daily Archive:','blogrow'); ?> <span><?php echo esc_html( get_the_time('F j, Y') ); ?></span></h1>
<?php elseif ( is_month() ): ?>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Monthly Archive:','blogrow'); ?> <span><?php echo get_the_time('F Y'); ?></span></h1>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Monthly Archive:','blogrow'); ?> <span><?php echo esc_html( get_the_time('F Y') ); ?></span></h1>
<?php elseif ( is_year() ): ?>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Yearly Archive:','blogrow'); ?> <span><?php echo get_the_time('Y'); ?></span></h1>
<h1><i class="fa fa-calendar"></i><?php esc_html_e('Yearly Archive:','blogrow'); ?> <span><?php echo esc_html( get_the_time('Y') ); ?></span></h1>
<?php elseif ( has_post_format('audio') ): ?>
<h1><i class="fa fa-volume-up"></i><?php esc_html_e('Type:','blogrow'); ?> <span><?php esc_html_e('Audio','blogrow'); ?></span></h1>