diff --git a/functions.php b/functions.php index 950717e..22f8b69 100644 --- a/functions.php +++ b/functions.php @@ -57,7 +57,7 @@ function register_ildi_menus() { register_nav_menus(array( 'header-menu' => __('Header Menu', 'ildi'), 'utility-menu' => __('Utility Links', 'ildi'), - // 'footer-menu' => __('Footer Menu', 'ildi') + 'homepage-list' => __('HomePage List', 'ildi') )); } diff --git a/home-loop.php b/home-loop.php index b13f7f3..3f79f3a 100644 --- a/home-loop.php +++ b/home-loop.php @@ -1,28 +1,45 @@
12, - 'post__in' => $sticky, - 'ignore_sticky_posts' => 1 - ); - $query = new WP_Query( $args ); + $homeList = wp_get_nav_menu_items('homepage-list'); - if ( isset($sticky[0]) && $query->have_posts() ) { - while ( $query->have_posts() ) { - $query->the_post(); ?> + if($homeList){ + foreach($homeList as $item){ + $post = get_post($item->object_id); -
- ', '' ); - the_post_thumbnail(); - ?> -
+ ?>
+ +

post_title); ?>

+ +
+
12, + 'post__in' => $sticky, + 'ignore_sticky_posts' => 1 + ); + $query = new WP_Query( $args ); + + if ( isset($sticky[0]) && $query->have_posts() ) { + while ( $query->have_posts() ) { + $query->the_post(); ?> + +
+ ', '' ); + the_post_thumbnail(); + ?> +
+ +