function epl_load_core_templates($template) { global $epl_settings; $template_path = epl_get_content_path(); if (isset($epl_settings['epl_feeling_lucky']) && $epl_settings['epl_feeling_lucky'] == 'on') { return $template; } $post_tpl = ''; if (is_epl_post_single()) { $common_tpl = apply_filters('epl_common_single_template', 'single-listing.php'); $post_tpl = 'single-' . str_Replace('_', '-', get_post_type()) . '.php'; $find[] = $post_tpl; $find[] = epl_template_path() . $post_tpl; $find[] = $common_tpl; $find[] = epl_template_path() . $common_tpl; } elseif (is_epl_post_archive()) { $common_tpl = apply_filters('epl_common_archive_template', 'archive-listing.php'); $post_tpl = 'archive-' . str_Replace('_', '-', get_post_type()) . '.php'; $find[] = $post_tpl; $find[] = epl_template_path() . $post_tpl; $find[] = $common_tpl; $find[] = epl_template_path() . $common_tpl; } elseif (is_tax('location') || is_tax('tax_feature')) { $term = get_queried_object(); $common_tpl = apply_filters('epl_common_taxonomy_template', 'archive-listing.php'); $post_tpl = 'taxonomy-' . $term->taxonomy . '.php'; $find[] = 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php'; $find[] = epl_template_path() . 'taxonomy-' . $term->taxonomy . '-' . $term->slug . '.php'; $find[] = 'taxonomy-' . $term->taxonomy . '.php'; $find[] = epl_template_path() . 'taxonomy-' . $term->taxonomy . '.php'; $find[] = $common_tpl; $find[] = $post_tpl; $find[] = epl_template_path() . $common_tpl; } if ($post_tpl) { $template = locate_template(array_unique($find)); if (!$template) { $template = $template_path . $common_tpl; } } return $template; }
/** * A workaround to avoid duplicate thumbnails for single listings being displayed on archive pages via theme & epl * attempts to null the post thumbnail image called from theme & display thumbnail image called from epl * * @since 2.2 */ function epl_remove_archive_thumbnail($html, $post_id, $post_thumbnail_id, $size, $attr) { if (is_admin()) { return $html; } if (is_epl_post_archive()) { // allow archive listing images as well as widget images if (doing_action('epl_property_archive_featured_image') || doing_action('epl_property_widgets_featured_image') || doing_action('epl_author_thumbnail') || doing_action('epl_author_widget_thumbnail')) { } else { $html = ''; } } return $html; }
function cmo_breadcrumb() { if (class_exists('Woocommerce') && is_woocommerce()) { woocommerce_breadcrumb(array('delimiter' => '', 'wrap_before' => '<ul class="cmo-breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'home' => __('Home', 'cumulo'))); return; } if (function_exists("is_bbpress") && is_bbpress()) { bbp_breadcrumb(array('before' => '<ul class="cmo-breadcrumbs">', 'after' => '</ul>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'sep' => '', 'pad_sep' => 0, 'sep_before' => '', 'sep_after' => '', 'current_before' => '', 'current_after' => '')); return; } global $post; echo '<ul class="cmo-breadcrumbs">'; if (!is_front_page()) { echo '<li><a href="'; echo home_url(); echo '">' . __('Home', 'cumulo') . "</a></li>"; // echo '"><i class="fa fa-home"></i></a></li>'; } $params['link_none'] = ''; $separator = ''; if (is_category() && !is_singular('cmo_portfolio')) { $category = get_the_category(); $ID = $category[0]->cat_ID; echo is_wp_error($cat_parents = get_category_parents($ID, TRUE, '', FALSE)) ? '' : '<li>' . $cat_parents . '</li>'; } if (is_singular('cmo_portfolio')) { echo '<li><a href="' . site_url('portfolio-items') . '">' . esc_html__('Portfolio', 'cumulo') . '</a></li>'; echo get_the_term_list($post->ID, 'portfolio_category', '<li>', ', ', '</li>'); echo '<li>' . get_the_title() . '</li>'; } if (function_exists("is_epl_post") && is_epl_post() && !is_epl_post_archive()) { echo '<li><a href="' . site_url('property') . '">' . esc_html__('Properties', 'cumulo') . '</a></li>'; } if (is_singular('event')) { $terms = get_the_term_list($post->ID, 'event-categories', '<li>', ', ', '</li>'); if (!is_wp_error($terms)) { echo get_the_term_list($post->ID, 'event-categories', '<li>', ', ', '</li>'); } echo '<li>' . get_the_title() . '</li>'; } if (is_tax()) { $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy')); $link = get_term_link($term); if (is_wp_error($link)) { echo sprintf('<li>%s</li>', $term->name); } else { echo sprintf('<li><a href="%s" title="%s">%s</a></li>', $link, $term->name, $term->name); } } if (is_home()) { echo '<li>' . '' . '</li>'; ///$smof_data['blog_page_title'] } if (is_page() && !is_front_page()) { $parents = array(); $parent_id = $post->post_parent; while ($parent_id) { $page = get_page($parent_id); if ($params["link_none"]) { $parents[] = get_the_title($page->ID); } else { $parents[] = '<li><a href="' . get_permalink($page->ID) . '" title="' . get_the_title($page->ID) . '">' . get_the_title($page->ID) . '</a></li>' . $separator; } $parent_id = $page->post_parent; } $parents = array_reverse($parents); echo join('', $parents); echo '<li>' . get_the_title() . '</li>'; } if (is_single() && !is_singular('cmo_portfolio') && !is_singular('tribe_events') && !is_singular('event') && !is_singular('wpfc_sermon')) { $categories_1 = get_the_category($post->ID); if ($categories_1) { foreach ($categories_1 as $cat_1) { $cat_1_ids[] = $cat_1->term_id; } $cat_1_line = implode(',', $cat_1_ids); } if (isset($cat_1_line) && $cat_1_line) { $categories = get_categories(array('include' => $cat_1_line, 'orderby' => 'id')); if ($categories) { echo '<li>'; $cats = ''; foreach ($categories as $cat) { if ($cats != '') { $cats .= ', '; } $cats .= '<a href="' . get_category_link($cat->term_id) . '" title="' . $cat->name . '">' . $cat->name . '</a>'; } echo $cats; echo '</li>'; } } echo '<li>' . get_the_title() . '</li>'; } if (is_tag()) { echo '<li>' . "Tag: " . single_tag_title('', FALSE) . '</li>'; } if (is_search()) { echo '<li>' . __("Search", 'cumulo') . '</li>'; } if (is_404()) { echo '<li>' . __("404 - Page Not Found", 'cumulo') . '</li>'; } if (is_archive() && is_post_type_archive()) { $title = post_type_archive_title('', false); $sermon_settings = get_option('wpfc_options'); if (is_array($sermon_settings)) { $title = $sermon_settings['archive_title']; } echo '<li>' . $title . '</li>'; } echo "</ul>"; }