From 1aa3fa0f33e72af727e5a8d80c70e271d30f107b Mon Sep 17 00:00:00 2001 From: Ben Word Date: Mon, 30 May 2011 09:40:02 -0600 Subject: [PATCH] moving yoast breadcrumb support into actions --- inc/roots-actions.php | 11 +++++++++++ loop-page.php | 1 - 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/inc/roots-actions.php b/inc/roots-actions.php index a769b09..1f23ec2 100644 --- a/inc/roots-actions.php +++ b/inc/roots-actions.php @@ -5,6 +5,7 @@ add_action('roots_header_before', 'roots_1140_header_before'); add_action('roots_header_after', 'roots_1140_header_after'); add_action('roots_footer_before', 'roots_1140_footer_before'); add_action('roots_footer_after', 'roots_1140_footer_after'); +add_action('roots_post_inside_before', 'roots_page_breadcrumb'); function roots_1140_head() { $options = roots_get_theme_options(); @@ -49,4 +50,14 @@ function roots_1140_footer_after() { } } +function roots_page_breadcrumb() { + global $post; + if (function_exists('yoast_breadcrumb')) { + if (is_page() && $post->post_parent) { + yoast_breadcrumb(''); + } + } + wp_reset_postdata(); +} + ?> \ No newline at end of file diff --git a/loop-page.php b/loop-page.php index e846683..662221d 100644 --- a/loop-page.php +++ b/loop-page.php @@ -2,7 +2,6 @@ - post_parent) { yoast_breadcrumb(''); } } ?>

'' )); ?>