added two new widget areas to front page
This commit is contained in:
parent
c2ce660a53
commit
8be2d4c9cc
|
@ -12,8 +12,30 @@ if ( ! function_exists( 'foundationpress_sidebar_widgets' ) ) :
|
||||||
array(
|
array(
|
||||||
'id' => 'home-announcement-widgets',
|
'id' => 'home-announcement-widgets',
|
||||||
'name' => __( 'Home Announcement widgets', 'foundationpress' ),
|
'name' => __( 'Home Announcement widgets', 'foundationpress' ),
|
||||||
'description' => __( 'Drag widgets to this Home page container.', 'foundationpress' ),
|
'description' => __( 'Drag widgets to this Home page container that will show at the top.', 'foundationpress' ),
|
||||||
'before_widget' => '<section id="%1$s" class="widget slide %2$s">',
|
'before_widget' => '<section id="%1$s" class="widget slide home-announcement %2$s">',
|
||||||
|
'after_widget' => '</section>',
|
||||||
|
'before_title' => '<h6>',
|
||||||
|
'after_title' => '</h6>',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
register_sidebar(
|
||||||
|
array(
|
||||||
|
'id' => 'home-announcement-middle-widgets',
|
||||||
|
'name' => __( 'Home Announcement Middle widgets', 'foundationpress' ),
|
||||||
|
'description' => __( 'Drag widgets to this Home page container that will show in the middle.', 'foundationpress' ),
|
||||||
|
'before_widget' => '<section id="%1$s" class="widget slide home-middle-announcement %2$s">',
|
||||||
|
'after_widget' => '</section>',
|
||||||
|
'before_title' => '<h6>',
|
||||||
|
'after_title' => '</h6>',
|
||||||
|
)
|
||||||
|
);
|
||||||
|
register_sidebar(
|
||||||
|
array(
|
||||||
|
'id' => 'home-announcement-bottom-widgets',
|
||||||
|
'name' => __( 'Home Announcement Bottom widgets', 'foundationpress' ),
|
||||||
|
'description' => __( 'Drag widgets to this Home page container that will show at the bottom.', 'foundationpress' ),
|
||||||
|
'before_widget' => '<section id="%1$s" class="widget slide home-bottom-announcement %2$s">',
|
||||||
'after_widget' => '</section>',
|
'after_widget' => '</section>',
|
||||||
'before_title' => '<h6>',
|
'before_title' => '<h6>',
|
||||||
'after_title' => '</h6>',
|
'after_title' => '</h6>',
|
||||||
|
|
|
@ -12,5 +12,10 @@ get_header(); ?>
|
||||||
<main>
|
<main>
|
||||||
<?php get_template_part( 'template-parts/section', 'news' ); ?>
|
<?php get_template_part( 'template-parts/section', 'news' ); ?>
|
||||||
</main>
|
</main>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
<?php get_template_part( 'template-parts/home', 'announcement-middle' ); ?>
|
||||||
|
|
||||||
|
<?php get_template_part( 'template-parts/home', 'announcement-bottom' ); ?>
|
||||||
|
|
||||||
<?php get_footer();
|
<?php get_footer();
|
||||||
|
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The breaking div containing the main widget area
|
||||||
|
*
|
||||||
|
* @package arcHIVE-theme
|
||||||
|
* @since arcHIVE-theme 1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<section class="hero">
|
||||||
|
<main class="slides">
|
||||||
|
<?php dynamic_sidebar( 'home-announcement-bottom-widgets' ); ?>
|
||||||
|
</main>
|
||||||
|
<aside>
|
||||||
|
<nav>
|
||||||
|
<?php //foundationpress_home_hero_bar(); ?>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
</section>
|
|
@ -0,0 +1,19 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* The breaking div containing the main widget area
|
||||||
|
*
|
||||||
|
* @package arcHIVE-theme
|
||||||
|
* @since arcHIVE-theme 1.0.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
?>
|
||||||
|
<section class="hero">
|
||||||
|
<main class="slides">
|
||||||
|
<?php dynamic_sidebar( 'home-announcement-middle-widgets' ); ?>
|
||||||
|
</main>
|
||||||
|
<aside>
|
||||||
|
<nav>
|
||||||
|
<?php //foundationpress_home_hero_bar(); ?>
|
||||||
|
</nav>
|
||||||
|
</aside>
|
||||||
|
</section>
|
|
@ -10,10 +10,10 @@
|
||||||
|
|
||||||
<section class="category-posts news">
|
<section class="category-posts news">
|
||||||
<header>
|
<header>
|
||||||
<h2> <?php single_term_title( );?></h2>
|
<h2> News </h2>
|
||||||
</header>
|
</header>
|
||||||
<main class="">
|
<main class="">
|
||||||
<?php $the_query = new WP_Query( array( 'category_name' => 'news', 'posts_per_page' => 6 ) ); ?>
|
<?php $the_query = new WP_Query( array( 'category_name' => 'news', 'posts_per_page' => 3 ) ); ?>
|
||||||
<?php if ( $the_query->have_posts() ) : ?>
|
<?php if ( $the_query->have_posts() ) : ?>
|
||||||
<?php //the loop ?>
|
<?php //the loop ?>
|
||||||
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
|
||||||
|
|
Loading…
Reference in New Issue