Ejemplo n.º 1
0
 function vce_add_mega_menu_support()
 {
     if (vce_get_option('use_mega_menu')) {
         add_filter('wp_setup_nav_menu_item', 'vce_add_custom_nav_fields');
         add_action('wp_update_nav_menu_item', 'vce_update_custom_nav_fields', 10, 3);
         add_filter('wp_edit_nav_menu_walker', 'vce_edit_menu_walker', 10, 2);
         add_filter('nav_menu_css_class', 'vce_add_class_to_menu', 10, 2);
         add_filter('nav_menu_link_attributes', 'vce_nav_link_atts', 10, 3);
     }
 }
Ejemplo n.º 2
0
function vce_register_sidebars()
{
    /* Default Sidebar */
    register_sidebar(array('id' => 'vce_default_sidebar', 'name' => __('Default Sidebar', THEME_SLUG), 'description' => __('This is default sidebar.', THEME_SLUG), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    /* Default Sticky Sidebar */
    register_sidebar(array('id' => 'vce_default_sticky_sidebar', 'name' => __('Default Sticky Sidebar', THEME_SLUG), 'description' => __('This is default sticky sidebar. Sticky means that it will be always pinned to top while you are scrolling through your website content.', THEME_SLUG), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    /* Add sidebars from theme options */
    $custom_sidebars = vce_get_option('add_sidebars');
    if ($custom_sidebars) {
        for ($i = 1; $i <= $custom_sidebars; $i++) {
            register_sidebar(array('id' => 'vce_sidebar_' . $i, 'name' => __('Sidebar', THEME_SLUG) . ' ' . $i, 'description' => '', 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title"><span>', 'after_title' => '</span></h4>'));
        }
    }
    /* Footer Sidebar Area 1*/
    register_sidebar(array('id' => 'vce_footer_sidebar_1', 'name' => __('Footer Column 1', THEME_SLUG), 'description' => __('This is sidebar to use in footer area column 1.', THEME_SLUG), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    /* Footer Sidebar Area 2*/
    register_sidebar(array('id' => 'vce_footer_sidebar_2', 'name' => __('Footer Column 2', THEME_SLUG), 'description' => __('This is sidebar to use in footer area column 2.', THEME_SLUG), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
    /* Footer Sidebar Area 1*/
    register_sidebar(array('id' => 'vce_footer_sidebar_3', 'name' => __('Footer Column 3', THEME_SLUG), 'description' => __('This is sidebar to use in footer area column 3.', THEME_SLUG), 'before_widget' => '<div id="%1$s" class="widget %2$s">', 'after_widget' => '</div>', 'before_title' => '<h4 class="widget-title">', 'after_title' => '</h4>'));
}
Ejemplo n.º 3
0
		<?php 
}
?>

		<?php 
if (vce_get_post_display('show_related')) {
    ?>
			<?php 
    get_template_part('sections/related-box');
    ?>
		<?php 
}
?>

		<?php 
if (vce_get_post_display('show_author_box') && vce_get_option('author_box_position') == 'down') {
    ?>
			<?php 
    get_template_part('sections/author-box');
    ?>
		<?php 
}
?>

		<?php 
comments_template();
?>

	</div>

	<?php 
Ejemplo n.º 4
0
<div class="vce-featured">

    <div class="vce-featured-header">
        <div class="vce-featured-info">
            <div class="vce-hover-effect">

                <?php 
if (vce_get_option('lay_fa_big_cat')) {
    ?>
                    <div class="vce-featured-section">
                        <?php 
    echo vce_get_category();
    ?>
                    </div>
                <?php 
}
?>

                <h2 class="vce-featured-title">
                    <a class="vce-featured-link-article" href="<?php 
echo esc_url(get_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
the_title();
?>
</a>        
                </h2>
Ejemplo n.º 5
0
?>


<?php 
/* Generate css for category colors */
$cat_colors = get_option('vce_cat_colors');
if (!empty($cat_colors)) {
    foreach ($cat_colors as $cat => $color) {
        if ($cat != 0) {
            echo 'a.category-' . $cat . ', .sidebar .widget .vce-post-list a.category-' . $cat . '{ color: ' . $color . ';}';
            echo 'body.category-' . $cat . ' .main-box-title, .main-box-title.cat-' . $cat . ' { border-top: 2px solid ' . $color . ';}';
            echo '.widget_categories li.cat-item-' . $cat . ' .count { background: ' . $color . ';}';
            echo '.widget_categories li.cat-item-' . $cat . ':before { background:' . $color . ';}';
            echo '.vce-featured-section .category-' . $cat . ', .vce-post-big .meta-category a.category-' . $cat . ', .vce-post-slider .meta-category a.category-' . $cat . '{ background-color: ' . $color . ';}';
            echo '.vce-lay-g .vce-featured-info .meta-category a.category-' . $cat . '{ background-color: ' . $color . ';}';
            echo '.vce-lay-h header .meta-category a.category-' . $cat . '{ background-color: ' . $color . ';}';
            if (vce_get_option('color_navigation_cat')) {
                echo '.main-navigation li.vce-cat-' . $cat . ' a:hover { color: ' . $color . ';}';
            }
        }
    }
}
/* Apply uppercase options */
$text_upper = vce_get_option('text_upper');
if (!empty($text_upper)) {
    foreach ($text_upper as $text_class => $val) {
        if ($val) {
            echo '.' . $text_class . '{text-transform: uppercase;}';
        }
    }
}
Ejemplo n.º 6
0
while (have_posts()) {
    the_post();
    ?>

			<?php 
    get_template_part('sections/content', 'page');
    ?>

		<?php 
}
?>

		</main>

		<?php 
if (vce_get_option('page_show_comments')) {
    ?>
			<?php 
    comments_template();
    ?>
		<?php 
}
?>

	</div>

	<?php 
if ($vce_sidebar_opts['use_sidebar'] == 'right') {
    get_sidebar();
}
?>
Ejemplo n.º 7
0
 public function end_el(&$output, $item, $depth = 0, $args = array())
 {
     $use_ajax_menu = vce_get_option('ajax_mega_menu') ? true : false;
     if ($depth == 0 && $item->mega_menu_cat) {
         $output .= '<ul class="vce-mega-menu-wrapper">';
         $output .= !$use_ajax_menu ? vce_load_mega_menu($item->object_id) : '';
         $output .= '</ul>';
     }
 }
Ejemplo n.º 8
0
	<?php 
}
?>

	<header class="entry-header">
		<h1 class="entry-title entry-title-page"><?php 
the_title();
?>
</h1>
	</header>

	<div class="entry-content page-content">
		<?php 
the_content();
?>
		<?php 
wp_link_pages(array('before' => '', 'after' => '', 'next_or_number' => 'next'));
?>
	</div>

	<?php 
if (vce_get_option('page_show_share')) {
    ?>
	  	<?php 
    get_template_part('sections/share-bar');
    ?>
	<?php 
}
?>

</article>
Ejemplo n.º 9
0
 function vce_get_bg_styles($option = false)
 {
     $style = vce_get_option($option);
     $css = '';
     if (!empty($style) && is_array($style)) {
         foreach ($style as $key => $value) {
             if (!empty($value) && $key != "media") {
                 if ($key == "background-image") {
                     $css .= $key . ":url('" . $value . "');";
                 } else {
                     $css .= $key . ":" . $value . ";";
                 }
             }
         }
     }
     return $css;
 }
Ejemplo n.º 10
0
        ?>
"></i>
					</span>
				<?php 
    }
    ?>
			</a>
		</div>
	<?php 
}
?>
	

	<header class="entry-header">
		<?php 
if (vce_get_option('lay_d_cat')) {
    ?>
			<span class="meta-category"><?php 
    echo vce_get_category();
    ?>
</span>
		<?php 
}
?>
		<h2 class="entry-title"><a href="<?php 
echo esc_url(get_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
Ejemplo n.º 11
0
		<?php 
}
?>
		
		<?php 
if ($top_bar_right = vce_get_option('top_bar_right')) {
    ?>
			<div class="vce-wrap-right">
				<?php 
    get_template_part('sections/' . $top_bar_right);
    ?>
			</div>
		<?php 
}
?>

		<?php 
if ($top_bar_center = vce_get_option('top_bar_center')) {
    ?>
			<div class="vce-wrap-center">
				<?php 
    get_template_part('sections/' . $top_bar_center);
    ?>
			</div>
		<?php 
}
?>
		*/

	</div>
</div>
Ejemplo n.º 12
0
	
	<div class="main-box vce-related-box">

	<h3 class="main-box-title"><?php 
    echo __vce('related_title');
    ?>
</h3>
	
	<div class="main-box-inside">

		<?php 
    while ($related_posts->have_posts()) {
        $related_posts->the_post();
        ?>
			<?php 
        get_template_part('sections/loops/layout', vce_get_option('related_layout'));
        ?>
		<?php 
    }
    ?>

	</div>

	</div>

<?php 
}
?>

<?php 
wp_reset_postdata();
Ejemplo n.º 13
0
<?php

$in_same_cat = vce_get_option('prev_next_cat') ? true : false;
$prev = get_previous_post($in_same_cat);
$next = get_next_post($in_same_cat);
?>
<nav class="prev-next-nav">
	<?php 
if ($prev) {
    ?>
		<?php 
    $img = vce_featured_image('vce-lay-b', $prev->ID);
    ?>

		<div class="vce-prev-link">
			<?php 
    previous_post_link('%link', '<span class="img-wrp">' . $img . '<span class="vce-pn-ico"><i class="fa fa fa-chevron-left"></i></span></span><span class="vce-prev-next-link">%title</span>', $in_same_cat);
    ?>
		</div>

	<?php 
}
?>
	
	<?php 
if ($next) {
    ?>
		<?php 
    $img = vce_featured_image('vce-lay-b', $next->ID);
    ?>
Ejemplo n.º 14
0
<?php

$share = array();
$share['facebook'] = '<a class="fa fa-facebook" href="javascript:void(0);" data-url="http://www.facebook.com/sharer/sharer.php?u=' . get_permalink() . '&amp;t=' . esc_attr(get_the_title()) . '"></a>';
$share['twitter'] = '<a class="fa fa-twitter" href="javascript:void(0);" data-url="http://twitter.com/intent/tweet?url=' . get_permalink() . '&amp;text=' . esc_attr(get_the_title()) . '"></a>';
$share['gplus'] = '<a class="fa fa-google-plus" href="javascript:void(0);" data-url="https://plus.google.com/share?url=' . get_permalink() . '"></a>';
$pin_img = has_post_thumbnail() ? wp_get_attachment_image_src(get_post_thumbnail_id(), 'full') : '';
$pin_img = isset($pin_img[0]) ? $pin_img[0] : '';
$share['pinterest'] = '<a class="fa fa-pinterest" href="javascript:void(0);" data-url="http://pinterest.com/pin/create/button/?url=' . get_permalink() . '&amp;media=' . $pin_img . '&amp;description=' . esc_attr(get_the_title()) . '"></a>';
$share['linkedin'] = '<a class="fa fa-linkedin" href="javascript:void(0);" data-url="http://www.linkedin.com/shareArticle?mini=true&amp;url=' . get_permalink() . '&amp;title=' . esc_attr(get_the_title()) . '"></a>';
if (is_page()) {
    $share_options = vce_get_option('page_social_share');
} else {
    $share_options = vce_get_option('social_share');
}
$vce_share_html = '';
foreach ($share_options as $social => $value) {
    if ($value) {
        $vce_share_html .= '<li>' . $share[$social] . '</li>';
    }
}
?>

<?php 
if ($vce_share_html) {
    ?>
	<div class="vce-share-bar">
		<ul class="vce-share-items">
			<?php 
    echo $vce_share_html;
    ?>
Ejemplo n.º 15
0
}
?>
	</header>

	<?php 
if (vce_get_option('lay_c_excerpt')) {
    ?>
		<div class="entry-content">
			<p><?php 
    echo vce_get_excerpt('lay-c');
    ?>
</p>
		</div>
	<?php 
}
?>

	<?php 
if (vce_get_option('lay_c_readmore')) {
    ?>
			<a href="<?php 
    echo esc_attr(get_permalink());
    ?>
" class="vce-read-more"><?php 
    echo __vce('read_more');
    ?>
</a>
	<?php 
}
?>
</article>
Ejemplo n.º 16
0
    ?>
<img src="<?php 
    echo $logo['url'];
    ?>
" alt="<?php 
    bloginfo('name');
    ?>
" /><?php 
} else {
    bloginfo('name');
}
?>
</a>
	</<?php 
echo $title_tag;
?>
>

<?php 
if (vce_get_option('header_description')) {
    ?>
<span class="site-description"><?php 
    echo get_bloginfo('description');
    ?>
</span>	
<?php 
}
?>
	

</div>
Ejemplo n.º 17
0
"><?php 
echo get_the_title();
?>
</a></h2>
            <?php 
if ($meta = vce_get_meta_data('lay-g')) {
    ?>
<div class="entry-meta"><?php 
    echo $meta;
    ?>
</div><?php 
}
?>
        	
        	<?php 
if (vce_get_option('lay_g_excerpt')) {
    ?>
				<div class="entry-content"><p><?php 
    echo vce_get_excerpt('lay-g');
    ?>
</p></div>
			<?php 
}
?>
        </div>
        
        <div class="vce-featured-header-background"></div>
    </div>

	<?php 
global $vce_sidebar_opts;
Ejemplo n.º 18
0
			
				</div>
			</div>
		<?php 
}
?>


	</footer>


</div>
</div>

<?php 
if (vce_get_option('scroll_to_top')) {
    ?>
<a href="javascript:void(0)" id="back-top"><i class="fa fa-angle-up"></i></a>
<?php 
}
?>

<?php 
wp_footer();
?>

<!-- jQuery -->
<script type="text/javascript" src="http://blog.chronasleep.com/wp-content/themes/voice/js/jquery.js?ver=1.3.1"></script>

<!-- Bootstrap Core JavaScript -->
<script type="text/javascript" src="http://blog.chronasleep.com/wp-content/themes/voice/js/bootstrap.min.js?ver=1.3.1"></script>
Ejemplo n.º 19
0
    get_template_part('sections/paginated-nav');
    ?>
	<?php 
}
?>

	<?php 
if (vce_get_post_display('show_tags')) {
    ?>
		<footer class="entry-footer">
			<div class="meta-tags">
				<?php 
    the_tags(false, ' ', false);
    ?>
			</div>
		</footer>
	<?php 
}
?>

	<?php 
if (vce_get_option('show_share')) {
    ?>
	  	<?php 
    get_template_part('sections/share-bar');
    ?>
	<?php 
}
?>

</article>
Ejemplo n.º 20
0
					<i class="fa <?php 
        echo $icon;
        ?>
"></i>
					</span>
				<?php 
    }
    ?>
			</a>
		</div>
	<?php 
}
?>

	<?php 
if (vce_get_option('lay_e_title')) {
    ?>
		<header class="entry-header">
			<h2 class="entry-title"><a href="<?php 
    echo esc_url(get_permalink());
    ?>
" title="<?php 
    echo esc_attr(get_the_title());
    ?>
"><?php 
    echo vce_get_title('lay-e');
    ?>
</a></h2>
			<?php 
    if ($meta = vce_get_meta_data('lay-e')) {
        ?>
Ejemplo n.º 21
0
    function vce_extend_navigation($items, $args)
    {
        if ($args->theme_location == 'vce_main_navigation_menu' && vce_get_option('header_search')) {
            $items .= '<li class="search-header-wrap"><a class="search_header" href="javascript:void(0)"><i class="fa fa-search"></i></a><ul class="search-header-form-ul"><li>';
            $items .= '<form class="search-header-form" action="' . esc_url(home_url('/')) . '" method="get">
		<input name="s" class="search-input" size="20" type="text" value="' . __vce('search_form') . '" onfocus="(this.value == \'' . __vce('search_form') . '\') && (this.value = \'\')" onblur="(this.value == \'\') && (this.value = \'' . __vce('search_form') . '\')" placeholder="' . __vce('search_form') . '" />
		</form>';
            $items .= '</li></ul></li>';
        }
        return $items;
    }
Ejemplo n.º 22
0
function vce_load_styles()
{
    //Load fonts
    $fonts = vce_generate_font_links();
    if (!empty($fonts)) {
        foreach ($fonts as $k => $font) {
            wp_register_style('vce_font_' . $k, $font, false, THEME_VERSION, 'screen');
            wp_enqueue_style('vce_font_' . $k);
        }
    }
    //Load main css file
    wp_register_style('vce_style', THEME_URI . 'style.css', false, THEME_VERSION, 'screen, print');
    wp_enqueue_style('vce_style');
    //WooCommerce style
    if (vce_is_woocommerce_active()) {
        wp_register_style('vce-woocommerce', CSS_URI . '/vce-woocommerce.css', array('vce_style'), THEME_VERSION, 'screen, print');
        wp_enqueue_style('vce-woocommerce');
    }
    //bbPress style
    if (vce_is_bbpress_active()) {
        wp_register_style('vce-bbpress', CSS_URI . '/vce-bbpress.css', array('vce_style'), THEME_VERSION, 'screen, print');
        wp_enqueue_style('vce-bbpress');
    }
    //Enqueue font awsm icons if css is not already included via plugin
    if (!wp_style_is('mks_shortcodes_fntawsm_css', 'enqueued')) {
        wp_register_style('vce_font_awesome', CSS_URI . '/font-awesome.min.css', false, THEME_VERSION, 'screen');
        wp_enqueue_style('vce_font_awesome');
    }
    //Load responsive css
    if (vce_get_option('responsive_mode')) {
        wp_register_style('vce_responsive', CSS_URI . '/responsive.css', array('vce_style'), THEME_VERSION, 'screen');
        wp_enqueue_style('vce_responsive');
    }
    //Load RTL css
    if (vce_get_option('rtl_mode')) {
        global $vce_rtl;
        $vce_rtl = true;
        //Check if current language is excluded from RTL
        $rtl_lang_skip = explode(",", vce_get_option('rtl_lang_skip'));
        if (!empty($rtl_lang_skip)) {
            $locale = get_locale();
            if (in_array($locale, $rtl_lang_skip)) {
                $vce_rtl = false;
            }
        }
        if ($vce_rtl) {
            wp_register_style('vce_rtl', CSS_URI . '/rtl.css', array('vce_style', 'vce_responsive'), THEME_VERSION, 'screen');
            wp_enqueue_style('vce_rtl');
        }
    }
    //Append dynamic css
    $vce_dynamic_css = vce_generate_dynamic_css();
    wp_add_inline_style('vce_style', $vce_dynamic_css);
}
Ejemplo n.º 23
0
      <div class="main-box-inside content-inside">
        <ul class="comment-list">
            <?php 
    $args = array('avatar_size' => 75, 'reply_text' => __vce('reply_comment'), 'format' => 'html5');
    ?>
            <?php 
    wp_list_comments($args);
    ?>
        </ul><!--END comment-list-->
        </div>
        <?php 
    if ($vce_paginate_comments = paginate_comments_links(array('echo' => false))) {
        ?>
          <div class="navigation">
             <?php 
        echo $vce_paginate_comments;
        ?>
          </div>
        <?php 
    }
    ?>
    </div><!--END comments holder -->
</div>
<?php 
}
?>

<?php 
if (comments_open() && vce_get_option('comments_position') == false) {
    comment_form($comment_form_args);
}
Ejemplo n.º 24
0
wp_head();
?>
	
<!-- Bootstrap Core CSS -->
<link rel="stylesheet" href="http://blog.chronasleep.com/wp-content/themes/voice/css/bootstrap.css?ver=1.3.1" rel="stylesheet">	
	
<!-- Custom CSS -->
<!--<link href="/css/agency.css" rel="stylesheet">-->
<link rel="stylesheet" href="http://blog.chronasleep.com/wp-content/themes/voice/css/fonts.css" rel="stylesheet">

	<!-- Custom Fonts -->
<link rel="stylesheet" href="http://blog.chronasleep.com/wp-content/themes/voice/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/css/fonts.css" type="text/css">
	
</head>

<body <?php 
body_class();
?>
>

<div id="vce-main">

<header id="header" class="main-header">

<?php 
get_template_part('sections/headers/header-' . vce_get_option('header_layout'));
?>
</header>

<div id="main-wrapper">
Ejemplo n.º 25
0
                <?php 
    if ($meta = vce_get_meta_data('single')) {
        ?>
                    <div class="entry-meta"><?php 
        echo $meta;
        ?>
</div>
                <?php 
    }
    ?>

            </div>
        </div>

        <?php 
    if (vce_get_option('show_fimg_cap') && ($caption = get_post(get_post_thumbnail_id())->post_excerpt)) {
        ?>
                        <div class="vce-photo-caption"><?php 
        echo $caption;
        ?>
</div>
                <?php 
    }
    ?>

        <div class="vce-featured-header-background"></div>
    </div>


    <?php 
    if ($fimage = vce_featured_image('vce-fa-full')) {
Ejemplo n.º 26
0
<div class="container header-2-wrapper header-main-area">	
	<?php 
get_template_part('sections/headers/logo');
?>

	<div class="vce-header-ads">
		<?php 
echo do_shortcode(vce_get_option('header_ad'));
?>
	</div>
</div>

<div class="header-bottom-wrapper header-left-nav">
	<div class="container">
		<?php 
get_template_part('sections/headers/navigation');
?>
	</div>
</div>
Ejemplo n.º 27
0
<div class="vce-grid-item">

    <div class="vce-grid-text">
    <?php 
$center_class = vce_get_option('lay_fa_grid_center') ? ' vce-vertical-center' : '';
?>
    <div class="vce-featured-info<?php 
echo $center_class;
?>
">
        <?php 
if (vce_get_option('lay_fa_grid_cat')) {
    ?>
            <div class="vce-featured-section">
                <?php 
    echo vce_get_category();
    ?>
            </div>
        <?php 
}
?>

        <h2 class="vce-featured-title">
            <a class="vce-featured-link-article" href="<?php 
echo esc_url(get_permalink());
?>
" title="<?php 
echo esc_attr(get_the_title());
?>
"><?php 
echo vce_get_title('lay-fa-grid');
Ejemplo n.º 28
0
<p><?php 
echo do_shortcode(vce_get_option('footer_copyright'));
?>
</p>