Skip to content

Commit

Permalink
Add a bunch of actions to the homepages
Browse files Browse the repository at this point in the history
  • Loading branch information
benlk committed Nov 10, 2015
1 parent f4ddf0b commit a0659be
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
7 changes: 7 additions & 0 deletions home.php
Expand Up @@ -36,17 +36,24 @@
largo_render_homepage_layout($home_template);

if ($home_template !== 'LegacyThreeColumn') {

do_action('largo_before_sticky_posts');

// sticky posts box if this site uses it
if ( of_get_option( 'show_sticky_posts' ) ) {
get_template_part( 'partials/sticky-posts', 'home' );
}

do_action('largo_after_sticky_posts');

// bottom section, we'll either use a two-column widget area or a single column list of recent posts
if ( of_get_option('homepage_bottom') === 'widgets' ) {
get_template_part('partials/home-bottom', 'widget-area');
} else if (of_get_option('homepage_bottom') === 'list') {
get_template_part('partials/home-post-list');
}

do_action('largo_after_homepage_bottom');
}
?>
</div><!-- #content-->
Expand Down
9 changes: 8 additions & 1 deletion homepages/templates/legacy-three-column.php
Expand Up @@ -8,16 +8,23 @@

get_template_part('homepages/templates/top-stories');

do_action('largo_before_sticky_posts');

// sticky posts box if this site uses it
if (of_get_option('show_sticky_posts'))
get_template_part('partials/sticky-posts');

do_action('largo_after_sticky_posts');

// bottom section, we'll either use a two-column widget area or a single column list of recent posts
if (of_get_option('homepage_bottom') === 'widgets') {
get_template_part('partials/home', 'bottom-widget-area');
} else {
get_template_part('partials/home-post-list');
} ?>
}

do_action('largo_after_homepage_bottom');
?>
</div>

<div id="left-rail" class="span4">
Expand Down

0 comments on commit a0659be

Please sign in to comment.