function wpex_display_breadcrumbs() { // Yoast breadcrumbs if (function_exists('yoast_breadcrumb')) { return yoast_breadcrumb('<nav class="site-breadcrumbs clr"">', '</nav>'); // Built-in breadcrumbs } else { if (wpex_option('breadcrumbs', '1') !== '1') { return; } echo wpex_breadcrumbs(); } }
function wpex_display_breadcrumbs($post_id = '') { // Get post id $post_id = $post_id ? $post_id : wpex_get_the_id(); // Check if breadcrumbs are disabled if (!wpex_breadcrumbs_enabled($post_id)) { return; } // Yoast breadcrumbs $yoast_options = get_option('wpseo_internallinks'); if (function_exists('yoast_breadcrumb') && $yoast_options['breadcrumbs-enable'] === true) { return yoast_breadcrumb('<nav class="site-breadcrumbs clr">', '</nav>'); } else { echo wpex_breadcrumbs($post_id); } }