Esempio n. 1
0
/**
 * Page titles
 */
function wheels_title()
{
    if (is_home()) {
        if (get_option('page_for_posts', true)) {
            return get_the_title(get_option('page_for_posts', true));
        } else {
            return __('Latest Posts', 'wheels');
        }
    } elseif (is_archive()) {
        $term = get_term_by('slug', get_query_var('term'), get_query_var('taxonomy'));
        if ($term) {
            return apply_filters('single_term_title', $term->name);
        } elseif (is_post_type_archive()) {
            return apply_filters('the_title', get_queried_object()->labels->name);
        } elseif (is_day()) {
            return sprintf(__('Daily Archives: %s', 'wheels'), get_the_date());
        } elseif (is_month()) {
            return sprintf(__('Monthly Archives: %s', 'wheels'), get_the_date('F Y'));
        } elseif (is_year()) {
            return sprintf(__('Yearly Archives: %s', 'wheels'), get_the_date('Y'));
        } elseif (is_author()) {
            $author = get_queried_object();
            return sprintf(__('Author: %s', 'wheels'), $author->display_name);
        } else {
            return single_cat_title('', false);
        }
    } elseif (is_search()) {
        return sprintf(__('Search Results for %s', 'wheels'), get_search_query());
    } elseif (is_404()) {
        return __('Not Found', 'wheels');
    } elseif (get_post_type() == 'tribe_events' && !is_single()) {
        return tribe_get_events_title();
    } else {
        return get_the_title();
    }
}
Esempio n. 2
0
 * @package TribeEventsCalendar
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
?>

<div id="tribe-events-content" class="tribe-events-list">

	<!-- List Title -->
	<?php 
do_action('tribe_events_before_the_title');
?>
	<h2 class="tribe-events-page-title"><?php 
echo tribe_get_events_title();
?>
</h2>
	<?php 
do_action('tribe_events_after_the_title');
?>

	<!-- Notices -->
	<?php 
tribe_the_notices();
?>

	<!-- List Header -->
	<?php 
do_action('tribe_events_before_header');
?>
Esempio n. 3
0
function avada_current_page_title_bar($post_id)
{
    global $smof_data;
    ob_start();
    if ($smof_data['breadcrumb']) {
        if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs') {
            if (class_exists('Woocommerce') && is_woocommerce() || (is_tax('product_cat') || is_tax('product_tag'))) {
                woocommerce_breadcrumb(array('wrap_before' => '<ul class="breadcrumbs">', 'wrap_after' => '</ul>', 'before' => '<li>', 'after' => '</li>', 'delimiter' => ''));
            } else {
                if (class_exists('bbPress') && is_bbpress()) {
                    bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => ' ', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => __('Home', 'Avada')));
                } else {
                    themefusion_breadcrumb();
                }
            }
        } else {
            get_search_form();
        }
    }
    $secondary_content = ob_get_contents();
    ob_get_clean();
    $title = '';
    $subtitle = '';
    if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
        $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
    }
    if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
        $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
    }
    if (!$title) {
        $title = get_the_title();
        if (is_home()) {
            $title = $smof_data['blog_title'];
        }
        if (is_search()) {
            $title = __('Rezultati pretrage za:', 'Avada') . get_search_query();
        }
        if (is_404()) {
            $title = __('Error 404 Page', 'Avada');
        }
        if (class_exists('TribeEvents') && tribe_is_event() && !is_single() || class_exists('TribeEvents') && is_events_archive() && is_404()) {
            $title = tribe_get_events_title();
        }
        if (is_archive() && !is_bbpress()) {
            if (is_day()) {
                $title = __('Dnevna arhiva:', 'Avada') . '<span> ' . get_the_date() . '</span>';
            } else {
                if (is_month()) {
                    $title = __('Mjesečna arhiva:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
                } elseif (is_year()) {
                    $title = __('Godišnja arhiva:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
                } elseif (is_author()) {
                    $curauth = get_user_by('id', get_query_var('author'));
                    $title = $curauth->nickname;
                } else {
                    $title = single_cat_title('', false);
                }
            }
        }
        if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
            if (!is_product()) {
                $title = woocommerce_page_title(false);
            }
        }
    }
    if (!$subtitle) {
        if (is_home()) {
            $subtitle = $smof_data['blog_subtitle'];
        }
    }
    if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
        if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || $smof_data['page_title_bar'] && get_post_meta($post_id, 'pyre_page_title', true) != 'no') {
            if (get_post_meta($post_id, 'pyre_page_title_text', true) == 'no') {
                $title = '';
                $subtitle = '';
            }
            if (is_home() && is_front_page() && !$smof_data['blog_show_page_title_bar']) {
                // do nothing
            } else {
                avada_page_title_bar($title, $subtitle, $secondary_content);
            }
        }
    } else {
        if (is_home() && !$smof_data['blog_show_page_title_bar']) {
            // do nothing
        } else {
            if ($smof_data['page_title_bar']) {
                avada_page_title_bar($title, $subtitle, $secondary_content);
            }
        }
    }
}
 /**
  * Loads the title into the page template
  *
  * @param string $title Title
  * @param int $post_id Id of the post
  *
  * @return string
  */
 public static function load_ecp_title_into_page_template($title, $post_id)
 {
     global $post;
     if (!is_single()) {
         return tribe_get_events_title();
     }
     // if the helper class for single event template hasn't been loaded fix that
     if (!class_exists('Tribe_Events_Single_Event_Template')) {
         self::getTemplateHierarchy('single-event');
     }
     // single event title
     $before_title = apply_filters('tribe_events_single_event_before_the_title', '', $post_id);
     $the_title = apply_filters('tribe_events_single_event_the_title', $title, $title, $post_id);
     $after_title = apply_filters('tribe_events_single_event_after_the_title', '', $post_id);
     return $before_title . $the_title . $after_title;
 }
 function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE)
 {
     if ($get_secondary_content) {
         ob_start();
         if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
             if ('Breadcrumbs' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('breadcrumbs', 'default', '')) || 'breadcrumbs' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
                 fusion_breadcrumbs();
             } elseif ('Search Box' == Avada()->settings->get('page_title_bar_bs') && in_array(get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true), array('searchbar', 'default', '')) || 'searchbar' == get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true)) {
                 get_search_form();
             }
         }
         $secondary_content = ob_get_contents();
         ob_get_clean();
     } else {
         $secondary_content = '';
     }
     $title = '';
     $subtitle = '';
     if ('' != get_post_meta($post_id, 'pyre_page_title_custom_text', true)) {
         $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
     }
     if ('' != get_post_meta($post_id, 'pyre_page_title_custom_subheader', true)) {
         $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
     }
     if ('' == get_post_meta($post_id, 'pyre_page_title_text', true) || 'default' == get_post_meta($post_id, 'pyre_page_title_text', true)) {
         $page_title_text = Avada()->settings->get('page_title_bar_text');
     } else {
         $page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true);
     }
     if (!$title) {
         $title = get_the_title();
         if (is_home()) {
             $title = Avada()->settings->get('blog_title');
         }
         if (is_search()) {
             $title = sprintf(__('Search results for: %s', 'Avada'), get_search_query());
         }
         if (is_404()) {
             $title = __('Error 404 Page', 'Avada');
         }
         if (class_exists('Tribe__Events__Main') && (tribe_is_event() && !is_single() && !is_home() || is_events_archive() || is_events_archive() && is_404())) {
             $title = tribe_get_events_title();
         }
         if (is_archive() && !is_bbpress() && !is_search()) {
             if (is_day()) {
                 $title = sprintf(__('Daily Archives: %s', 'Avada'), '<span>' . get_the_date() . '</span>');
             } else {
                 if (is_month()) {
                     $title = sprintf(__('Monthly Archives: %s', 'Avada'), '<span>' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>');
                 } elseif (is_year()) {
                     $title = sprintf(__('Yearly Archives: %s', 'Avada'), '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>');
                 } elseif (is_author()) {
                     $curauth = get_user_by('id', get_query_var('author'));
                     $title = $curauth->nickname;
                 } elseif (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'];
                     }
                 } else {
                     $title = single_cat_title('', false);
                 }
             }
         }
         if (class_exists('WooCommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
             if (!is_product()) {
                 $title = woocommerce_page_title(false);
             }
         }
     }
     if (!$subtitle && is_home()) {
         $subtitle = Avada()->settings->get('blog_subtitle');
     }
     if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
         if ('no' == $page_title_text && ('yes' == get_post_meta($post_id, 'pyre_page_title', true) || 'yes_without_bar' == get_post_meta($post_id, 'pyre_page_title', true) || 'hide' != Avada()->settings->get('page_title_bar') && 'no' != get_post_meta($post_id, 'pyre_page_title', true))) {
             $title = '';
             $subtitle = '';
         }
     } else {
         if ('hide' != Avada()->settings->get('page_title_bar') && 'no' == $page_title_text) {
             $title = '';
             $subtitle = '';
         }
     }
     return array($title, $subtitle, $secondary_content);
 }
Esempio n. 6
0
<?php

global $avia_config;
/*
 * get_header is a basic wordpress function, used to retrieve the header.php file in your theme directory.
 */
get_header();
$title = tribe_is_month() ? __('Calendar of Events', 'avia_framework') : tribe_get_events_title(false);
$args = array('title' => $title, 'link' => '');
if (!is_singular() || get_post_meta(get_the_ID(), 'header', true) != 'no') {
    echo avia_title($args);
}
?>

		<div class='container_wrap container_wrap_first main_color fullsize'>

			<div class='container'>

				<main class='template-page template-event-page content av-content-full units' <?php 
avia_markup_helper(array('context' => 'content', 'post_type' => 'page'));
?>
>
					
					 <div id="tribe-events-pg-template">
                   
                 	<?php 
tribe_events_before_html();
tribe_get_view();
tribe_events_after_html();
?>
					
Esempio n. 7
0
 function mfn_breadcrumbs($class = false)
 {
     global $post;
     $translate['home'] = mfn_opts_get('translate') ? mfn_opts_get('translate-home', 'Home') : __('Home', 'betheme');
     $homeLink = home_url();
     $separator = ' <span><i class="icon-right-open"></i></span>';
     // Plugin | bbPress -----------------------------------
     if (function_exists('is_bbpress') && is_bbpress()) {
         bbp_breadcrumb(array('before' => '<ul class="breadcrumbs">', 'after' => '</ul>', 'sep' => '<i class="icon-right-open"></i>', 'crumb_before' => '<li>', 'crumb_after' => '</li>', 'home_text' => $translate['home']));
         return true;
     }
     // end: bbPress -------------------------------------
     // Default breadcrumbs --------------------------------
     $breadcrumbs = array();
     // Home prefix --------------------------------
     $breadcrumbs[] = '<a href="' . $homeLink . '">' . $translate['home'] . '</a>';
     // Blog -------------------------------------------
     if (get_post_type() == 'post') {
         $blogID = false;
         if (get_option('page_for_posts')) {
             $blogID = get_option('page_for_posts');
             // Setings / Reading
         } elseif (mfn_opts_get('blog-page')) {
             $blogID = mfn_opts_get('blog-page');
             // Theme Options / Getting Started / Blog
         }
         if ($blogID) {
             $breadcrumbs[] = '<a href="' . get_permalink($blogID) . '">' . get_the_title($blogID) . '</a>';
         }
     }
     // Plugin | Events Calendar -------------------------------------------
     if (function_exists('tribe_is_month') && (tribe_is_event_query() || tribe_is_month() || tribe_is_event() || tribe_is_day() || tribe_is_venue())) {
         if (function_exists('tribe_get_events_link')) {
             $breadcrumbs[] = '<a href="' . tribe_get_events_link() . '">' . tribe_get_events_title() . '</a>';
         }
     } elseif (is_front_page() || is_home()) {
         // do nothing
         // Blog | Tag -------------------------------------
     } elseif (is_tag()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_tag_title('', false) . '</a>';
         // Blog | Category --------------------------------
     } elseif (is_category()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
         // Blog | Author ----------------------------------
     } elseif (is_author()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_author() . '</a>';
         // Blog | Day -------------------------------------
     } elseif (is_day()) {
         $breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
         $breadcrumbs[] = '<a href="' . get_month_link(get_the_time('Y'), get_the_time('m')) . '">' . get_the_time('F') . '</a>';
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('d') . '</a>';
         // Blog | Month -----------------------------------
     } elseif (is_month()) {
         $breadcrumbs[] = '<a href="' . get_year_link(get_the_time('Y')) . '">' . get_the_time('Y') . '</a>';
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('F') . '</a>';
         // Blog | Year ------------------------------------
     } elseif (is_year()) {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_time('Y') . '</a>';
         // Single -----------------------------------------
     } elseif (is_single() && !is_attachment()) {
         // Custom Post Type -----------------
         if (get_post_type() != 'post') {
             $post_type = get_post_type_object(get_post_type());
             $slug = $post_type->rewrite;
             $portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page'));
             // Portfolio Page ------------
             if ($slug['slug'] == mfn_opts_get('portfolio-slug', 'portfolio-item') && $portfolio_page_id) {
                 $breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
             }
             // Category ----------
             if ($portfolio_page_id) {
                 $terms = get_the_terms(get_the_ID(), 'portfolio-types');
                 if (!empty($terms) && !is_wp_error($terms)) {
                     $term = $terms[0];
                     $breadcrumbs[] = '<a href="' . get_term_link($term) . '">' . $term->name . '</a>';
                 }
             }
             // Single Item --------
             $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
             // Blog | Single --------------------
         } else {
             $cat = get_the_category();
             if (!empty($cat)) {
                 $breadcrumbs[] = get_category_parents($cat[0], true, $separator);
             }
             $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title() . '</a>';
         }
         // Taxonomy ---------------------------------------
     } elseif (!is_page() && get_post_taxonomies()) {
         // Portfolio ------------------------
         $post_type = get_post_type_object(get_post_type());
         if ($post_type->name == 'portfolio' && ($portfolio_page_id = mfn_wpml_ID(mfn_opts_get('portfolio-page')))) {
             $breadcrumbs[] = '<a href="' . get_page_link($portfolio_page_id) . '">' . get_the_title($portfolio_page_id) . '</a>';
         }
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . single_cat_title('', false) . '</a>';
         // Page with parent -------------------------------
     } elseif (is_page() && $post->post_parent) {
         $parent_id = $post->post_parent;
         $parents = array();
         while ($parent_id) {
             $page = get_page($parent_id);
             $parents[] = '<a href="' . get_permalink($page->ID) . '">' . get_the_title($page->ID) . '</a>';
             $parent_id = $page->post_parent;
         }
         $parents = array_reverse($parents);
         $breadcrumbs = array_merge_recursive($breadcrumbs, $parents);
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title(mfn_ID()) . '</a>';
         // Default ----------------------------------------
     } else {
         $breadcrumbs[] = '<a href="' . curPageURL() . '">' . get_the_title(mfn_ID()) . '</a>';
     }
     // PRINT ------------------------------------------------------------------
     echo '<ul class="breadcrumbs ' . $class . '">';
     $count = count($breadcrumbs);
     $i = 1;
     foreach ($breadcrumbs as $bk => $bc) {
         if (strpos($bc, $separator)) {
             // Category parents fix
             echo '<li>' . $bc . '</li>';
         } else {
             if ($i == $count) {
                 $separator = '';
             }
             echo '<li>' . $bc . $separator . '</li>';
         }
         $i++;
     }
     echo '</ul>';
 }
Esempio n. 8
0
 /**
  * Adds the markup of the breadcrumb leaf
  * @param  string	$object_id	ID of the current query object
  *
  * @return string 				The HTML markup of the breadcrumb leaf
  */
 private function get_breadcrumb_leaf_markup($object_type = '')
 {
     global $wp_query, $wp_locale;
     switch ($object_type) {
         case 'term':
             $term = $wp_query->get_queried_object();
             $title = $term->name;
             break;
         case 'year':
             $title = esc_html(get_query_var('year'));
             break;
         case 'month':
             $title = $wp_locale->get_month(get_query_var('monthnum'));
             break;
         case 'day':
             $title = get_query_var('day');
             break;
         case 'author':
             $user = $wp_query->get_queried_object();
             $title = $user->display_name;
             break;
         case 'search':
             $title = sprintf('%s %s', $this->search_prefix, esc_html(get_search_query()));
             break;
         case '404':
             $title = $this->error_prefix;
             break;
         case 'bbpress_search':
             $title = sprintf('%s %s', $this->search_prefix, esc_html(get_query_var('bbp_search')));
             break;
         case 'bbpress_user':
             $current_user = wp_get_current_user();
             $title = $current_user->user_nicename;
             break;
         case 'events':
             $title = tribe_get_events_title();
             break;
         default:
             $title = get_the_title($this->post->ID);
             break;
     }
     return sprintf('<span class="breadcrumb-leaf">%s</span>', $title);
 }
Esempio n. 9
0
 /**
  * Event Title (Display)
  *
  * Display an event's title with pseudo-breadcrumb if on a category
  *
  * @param bool $depth include linked title
  */
 function tribe_events_title($depth = true)
 {
     echo apply_filters('tribe_events_title', tribe_get_events_title($depth));
 }
Esempio n. 10
0
 /**
  * Get the title for the view
  *
  * @param      $title
  * @param null $sep
  *
  * @return string
  */
 protected function get_title($title, $sep = null)
 {
     return tribe_get_events_title(false) . ' ' . $sep . ' ' . $title;
 }
Esempio n. 11
0
 public static function load_ecp_title_into_page_template($title, $id)
 {
     global $post;
     return !is_single() && (isset($post->ID) && $post->ID == $id) ? tribe_get_events_title() : $title;
 }
Esempio n. 12
0
 /**
  * Render header title for the header bar
  */
 function fitclub_header_title()
 {
     if (is_archive()) {
         if (fitclub_is_tribe_page()) {
             $fitclub_header_title = tribe_get_events_title();
         } else {
             $fitclub_header_title = get_the_archive_title();
         }
     } elseif (is_404()) {
         $fitclub_header_title = esc_html__('Page NOT Found', 'fitclub');
     } elseif (is_search()) {
         $search_title = sprintf(esc_html__('Search Results for: %s', 'fitclub'), '<span>' . get_search_query() . '</span>');
         $fitclub_header_title = $search_title;
     } elseif (is_page()) {
         $fitclub_header_title = get_the_title();
     } elseif (is_single()) {
         $fitclub_header_title = get_the_title();
     } elseif (is_home()) {
         $queried_id = get_option('page_for_posts');
         $fitclub_header_title = get_the_title($queried_id);
     } else {
         $fitclub_header_title = '';
     }
     return esc_html($fitclub_header_title);
 }
Esempio n. 13
0
 function avada_get_page_title_bar_contents($post_id, $get_secondary_content = TRUE)
 {
     global $smof_data;
     if ($get_secondary_content) {
         ob_start();
         if (fusion_get_option('page_title_bar_bs', 'page_title_breadcrumbs_search_bar', $post_id) != 'none') {
             if ($smof_data['page_title_bar_bs'] == 'Breadcrumbs' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'breadcrumbs' || $smof_data['page_title_bar_bs'] != 'Breadcrumbs' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'breadcrumbs' || $smof_data['page_title_bar_bs'] == 'Breadcrumbs' && (get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'default' || get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == '')) {
                 fusion_breadcrumbs();
             } else {
                 if ($smof_data['page_title_bar_bs'] == 'Search Box' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'searchbar' || $smof_data['page_title_bar_bs'] != 'Search Box' && get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'searchbar' || $smof_data['page_title_bar_bs'] == 'Search Box' && (get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == 'default' || get_post_meta($post_id, 'pyre_page_title_breadcrumbs_search_bar', true) == '')) {
                     get_search_form();
                 }
             }
         }
         $secondary_content = ob_get_contents();
         ob_get_clean();
     } else {
         $secondary_content = '';
     }
     $title = '';
     $subtitle = '';
     if (get_post_meta($post_id, 'pyre_page_title_custom_text', true) != '') {
         $title = get_post_meta($post_id, 'pyre_page_title_custom_text', true);
     }
     if (get_post_meta($post_id, 'pyre_page_title_custom_subheader', true) != '') {
         $subtitle = get_post_meta($post_id, 'pyre_page_title_custom_subheader', true);
     }
     if (get_post_meta($post_id, 'pyre_page_title_text', true) == '' || get_post_meta($post_id, 'pyre_page_title_text', true) == 'default') {
         $page_title_text = $smof_data['page_title_bar_text'];
     } else {
         $page_title_text = get_post_meta($post_id, 'pyre_page_title_text', true);
     }
     if (!$title) {
         $title = get_the_title();
         if (is_home()) {
             $title = $smof_data['blog_title'];
         }
         if (is_search()) {
             $title = __('Search results for:', 'Avada') . ' ' . get_search_query();
         }
         if (is_404()) {
             $title = __('Error 404 Page', 'Avada');
         }
         if (class_exists('TribeEvents') && tribe_is_event() && !is_single() && !is_home() || class_exists('TribeEvents') && is_events_archive() || class_exists('TribeEvents') && is_events_archive() && is_404()) {
             $title = tribe_get_events_title();
         }
         if (is_archive() && !is_bbpress() && !is_search()) {
             if (is_day()) {
                 $title = __('Daily Archives:', 'Avada') . '<span> ' . get_the_date() . '</span>';
             } else {
                 if (is_month()) {
                     $title = __('Monthly Archives:', 'Avada') . '<span> ' . get_the_date(_x('F Y', 'monthly archives date format', 'Avada')) . '</span>';
                 } elseif (is_year()) {
                     $title = __('Yearly Archives:', 'Avada') . '<span> ' . get_the_date(_x('Y', 'yearly archives date format', 'Avada')) . '</span>';
                 } elseif (is_author()) {
                     $curauth = get_user_by('id', get_query_var('author'));
                     $title = $curauth->nickname;
                 } elseif (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'];
                     }
                 } else {
                     $title = single_cat_title('', false);
                 }
             }
         }
         if (class_exists('Woocommerce') && is_woocommerce() && (is_product() || is_shop()) && !is_search()) {
             if (!is_product()) {
                 $title = woocommerce_page_title(false);
             }
         }
     }
     if (!$subtitle) {
         if (is_home()) {
             $subtitle = $smof_data['blog_subtitle'];
         }
     }
     if (!is_archive() && !is_search() && !(is_home() && !is_front_page())) {
         if (get_post_meta($post_id, 'pyre_page_title', true) == 'yes' || get_post_meta($post_id, 'pyre_page_title', true) == 'yes_without_bar' || $smof_data['page_title_bar'] != 'hide' && get_post_meta($post_id, 'pyre_page_title', true) != 'no') {
             if ($page_title_text == 'no') {
                 $title = '';
                 $subtitle = '';
             }
         }
     } else {
         if ($smof_data['page_title_bar'] != 'hide') {
             if ($page_title_text == 'no') {
                 $title = '';
                 $subtitle = '';
             }
         }
     }
     return array($title, $subtitle, $secondary_content);
 }
 * Default Events Template
 * This file is the basic wrapper template for all the views if 'Default Events Template'
 * is selected in Events -> Settings -> Template -> Events Template.
 *
 * Override this template in your own theme by creating a file at [your-theme]/tribe-events/default-template.php
 *
 * @package TribeEventsCalendar
 * @since  3.0
 * @author Modern Tribe Inc.
 *
 */
if (!defined('ABSPATH')) {
    die('-1');
}
if (!is_singular()) {
    $title = tribe_get_events_title(false);
}
get_header();
?>
<div class="row page-wrapper">
	<?php 
WpvTemplates::left_sidebar();
?>
	<article <?php 
post_class(WpvTemplates::get_layout());
?>
>
		<?php 
tribe_events_before_html();
?>
		<?php 
Esempio n. 15
0
/**
 * Prints correct title/subtitle for all cases
 */
function grve_header_title()
{
    global $post;
    $page_title = $page_description = $page_reversed = '';
    //Shop
    if (grve_woocommerce_enabled() && is_shop() && !is_search()) {
        $post_id = wc_get_page_id('shop');
        $page_title = get_the_title($post_id);
        $page_description = get_post_meta($post_id, 'grve_page_description', true);
        return array('title' => $page_title, 'description' => $page_description);
    }
    //Events Calendar Overview Pages
    if (grve_events_calendar_is_overview()) {
        return array('title' => tribe_get_events_title(true), 'description' => '');
    }
    //Main Pages
    if (is_front_page() && is_home()) {
        // Default homepage
        $page_title = get_bloginfo('name');
        $page_description = get_bloginfo('description');
    } else {
        if (is_front_page()) {
            // static homepage
            $page_title = get_bloginfo('name');
            $page_description = get_bloginfo('description');
        } else {
            if (is_home()) {
                // blog page
                $page_title = get_bloginfo('name');
                $page_description = get_bloginfo('description');
            } else {
                if (is_search()) {
                    $page_description = __('Search Results for :', GRVE_THEME_TRANSLATE);
                    $page_title = esc_attr(get_search_query());
                    $page_reversed = 'reversed';
                } else {
                    if (is_singular()) {
                        $post_id = $post->ID;
                        $post_type = get_post_type($post_id);
                        //Single Post
                        if ($post_type == 'page' && is_singular('page')) {
                            $page_title = get_the_title();
                            $page_description = get_post_meta($post_id, 'grve_page_description', true);
                        } else {
                            if ($post_type == 'portfolio' && is_singular('portfolio')) {
                                $page_title = get_the_title();
                                $page_description = get_post_meta($post_id, 'grve_portfolio_description', true);
                            } else {
                                if (grve_events_calendar_enabled() && $post_type == 'tribe_events' && is_singular('tribe_events')) {
                                    $page_title = get_the_title();
                                    $page_description = tribe_events_event_schedule_details($post_id, '', '');
                                    if (tribe_get_cost()) {
                                        $page_description .= '<span class="grve-event-cost grve-bg-primary-1">' . tribe_get_cost(null, true) . '</span>';
                                    }
                                } else {
                                    if (grve_events_calendar_enabled() && $post_type == 'tribe_organizer' && is_singular('tribe_organizer')) {
                                        $page_title = get_the_title();
                                        $page_description = grve_event_organizer_title_meta();
                                    } else {
                                        $page_title = get_the_title();
                                    }
                                }
                            }
                        }
                    } else {
                        if (is_archive()) {
                            //Post Categories
                            if (is_category()) {
                                $page_title = single_cat_title("", false);
                                $page_description = category_description();
                            } else {
                                if (is_tag()) {
                                    $page_description = __("Posts Tagged :", GRVE_THEME_TRANSLATE);
                                    $page_title = single_tag_title("", false);
                                    $page_reversed = 'reversed';
                                } else {
                                    if (is_author()) {
                                        global $author;
                                        $userdata = get_userdata($author);
                                        $page_description = __("Posts By :", GRVE_THEME_TRANSLATE);
                                        $page_title = $userdata->display_name;
                                        $page_reversed = 'reversed';
                                    } else {
                                        if (is_day()) {
                                            $page_description = __("Daily Archives :", GRVE_THEME_TRANSLATE);
                                            $page_title = get_the_time('l, F j, Y');
                                            $page_reversed = 'reversed';
                                        } else {
                                            if (is_month()) {
                                                $page_description = __("Monthly Archives :", GRVE_THEME_TRANSLATE);
                                                $page_title = get_the_time('F Y');
                                                $page_reversed = 'reversed';
                                            } else {
                                                if (is_year()) {
                                                    $page_description = __("Yearly Archives :", GRVE_THEME_TRANSLATE);
                                                    $page_title = get_the_time('Y');
                                                    $page_reversed = 'reversed';
                                                } else {
                                                    if (grve_woocommerce_enabled() && is_tax()) {
                                                        $page_title = single_term_title("", false);
                                                    } else {
                                                        $page_title = __("Archives", GRVE_THEME_TRANSLATE);
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        } else {
                            $page_title = get_bloginfo('name');
                            $page_description = get_bloginfo('description');
                        }
                    }
                }
            }
        }
    }
    return array('title' => $page_title, 'description' => $page_description, 'reversed' => $page_reversed);
}
Esempio n. 16
0
 /**
  * Event Title (Display)
  *
  * Display an event's title with pseudo-breadcrumb if on a category
  *
  * @param bool $depth include linked title
  * @since 2.0
  */
 function tribe_events_title($depth = true)
 {
     echo tribe_get_events_title($depth);
 }