Highlight default count set to 5

This commit is contained in:
Alexander Agnarson 2025-03-27 14:53:24 +01:00
parent b3a33e5a61
commit 277556f8d1
2 changed files with 3 additions and 3 deletions

View file

@ -146,7 +146,7 @@ Kirki::add_field( 'dashwall_theme', array(
'label' => esc_html__( 'Highlight Post Count', 'dashwall' ),
'description' => esc_html__( 'Max number of highlight posts to display. Set it to 0 to disable.', 'dashwall' ),
'section' => 'blog',
'default' => '6',
'default' => '5',
'choices' => array(
'min' => '0',
'max' => '12',

View file

@ -6,13 +6,13 @@ $highlight = new WP_Query(
'update_post_meta_cache' => false,
'update_post_term_cache' => false,
'ignore_sticky_posts' => 1,
'posts_per_page' => absint( get_theme_mod('highlight-posts-count','6') ),
'posts_per_page' => absint( get_theme_mod('highlight-posts-count','5') ),
'cat' => absint( get_theme_mod('highlight-category','') )
)
);
?>
<?php if ( ( get_theme_mod('highlight-posts-count','6') !='0') && $highlight->have_posts() ): ?>
<?php if ( ( get_theme_mod('highlight-posts-count','5') !='0') && $highlight->have_posts() ): ?>
<div class="page-card page-card-highlights stickywrap">
<h3 class="stickywrap-heading"><?php esc_html_e('Highlights','dashwall'); ?></h3>