Пример #1
0
					<?php 
        if (has_post_thumbnail()) {
            ?>
						<figure class="post-image"><meta itemprop="image" content="<?php 
            echo esc_url(wp_get_attachment_thumb_url(get_post_thumbnail_id()));
            ?>
" />
							<a href="<?php 
            the_permalink();
            ?>
" title="<?php 
            the_title_attribute();
            ?>
">
								<?php 
            the_post_thumbnail(themify_base_get('setting-page_layout_image_size', 'large'));
            ?>
							</a>
						</figure>
					<?php 
        }
        // has post thumbnail
        ?>

					<div class="page-content">

						<?php 
        the_content();
        ?>

						<?php 
Пример #2
0
/**
 * Enqueue Stylesheets and Scripts
 */
function themify_base_theme_enqueue_scripts()
{
    // Google Web Fonts embedding
    wp_enqueue_style('themify-google-fonts', themify_base_https_esc('http://fonts.googleapis.com/css') . '?family=Montserrat:400,700|Open+Sans:400,300&subset=latin,latin-ext');
    // Themify base styling
    wp_enqueue_style('themify-style', get_stylesheet_uri(), array(), wp_get_theme()->display('Version'));
    // Themify Media Queries CSS
    wp_enqueue_style('themify-media-queries', THEME_URI . '/media-queries.css');
    // Skin stylesheet
    $skin = themify_base_get('skin');
    if ($skin && 'default' != $skin) {
        wp_enqueue_style('themify-skin', THEME_URI . '/skins/' . $skin . '/style.css', array('themify-style'));
    }
    // Fontello Icon Fonts
    wp_enqueue_style('themify-fontello', THEME_URI . '/fontello/css/fontello.css');
    ///////////////////
    // Enqueue scripts
    ///////////////////
    // Themify internal scripts
    wp_enqueue_script('theme-script', THEME_URI . '/js/themify.script.js', array('jquery'), false, true);
    // Inject variable values in gallery script
    wp_localize_script('theme-script', 'themifyScript', apply_filters('themify_script_vars', array('lightbox' => themify_base_lightbox_vars_init(), 'lightboxContext' => apply_filters('themify_lightbox_context', '#pagewrap'), 'isTouch' => themify_is_touch() ? 'true' : 'false', 'html5placeholder' => 'yes')));
    // WordPress internal script to move the comment box to the right place when replying to a user
    if (is_single() || is_page()) {
        wp_enqueue_script('comment-reply');
    }
}
Пример #3
0
/**
 * Load google fonts library
 */
function themify_base_enqueue_gfonts()
{
    $fonts = themify_base_get_custom_css_gfonts();
    $families = array();
    $user_subsets = themify_base_get('setting-webfonts_subsets', array('latin'));
    $subsets = apply_filters('themify_google_fonts_subsets', array_unique(array_merge(array('latin'), $user_subsets)));
    $query = null;
    $fonts = array_unique($fonts);
    foreach ($fonts as $font) {
        $words = explode('-', $font);
        $variant = themify_base_get_gfont_variant($font);
        foreach ($words as $key => $word) {
            $words[$key] = ucwords($word);
        }
        array_push($families, implode('+', $words) . ':' . $variant);
    }
    if (!empty($families)) {
        $query .= '?family=' . implode('|', $families);
        $query .= '&subset=' . implode(',', $subsets);
        // check to see if site is uses https
        $http = is_ssl() ? 'https' : 'http';
        $url = $http . '://fonts.googleapis.com/css';
        $url .= $query;
        wp_enqueue_style('themify-google-fonts', $url);
    }
}
Пример #4
0
<?php

/**
 * Template to load footer widgets.
 */
$footer_widget_option = themify_base_get('setting-footer_widgets', 'footerwidget-3col');
if ($footer_widget_option != 'none') {
    $columns = array('footerwidget-4col' => array('col4-1', 'col4-1', 'col4-1', 'col4-1'), 'footerwidget-3col' => array('col3-1', 'col3-1', 'col3-1'), 'footerwidget-2col' => array('col4-2', 'col4-2'), 'footerwidget-1col' => array(''));
    $x = 0;
    ?>

	<div class="footer-widgets clearfix">

		<?php 
    foreach ($columns[$footer_widget_option] as $col) {
        ?>
			<?php 
        $x++;
        if (1 == $x) {
            $class = 'first';
        } else {
            $class = '';
        }
        ?>
			<div class="<?php 
        echo $col;
        ?>
 <?php 
        echo $class;
        ?>
">
 /**
  * Enqueues Google Fonts
  * 
  * @since 2.2.6
  * @since 2.2.7 Fonts are enqueued in a single call.
  */
 function enqueue_fonts()
 {
     $this->generate_css(true);
     // Call only to enqueue fonts.
     if (!empty($this->customizer_fonts)) {
         $subsets = 'latin';
         $user_subsets = implode(',', themify_base_get('setting-subsets', array()));
         if (!empty($user_subsets)) {
             $subsets .= ",{$user_subsets}";
         }
         $this->customizer_fonts = str_replace(' ', '+', implode('|', $this->customizer_fonts));
         wp_enqueue_style('customizer-google-fonts' . md5($this->customizer_fonts . $subsets), themify_base_https_esc('http://fonts.googleapis.com/css') . '?family=' . $this->customizer_fonts . '&subset=' . $subsets);
     }
 }
Пример #6
0
			<!-- /.post-meta -->
		<?php 
}
?>

		<?php 
if (is_singular()) {
    ?>
			<?php 
    the_content();
    ?>
		<?php 
} else {
    ?>
			<?php 
    $entry_content_display = themify_base_get('setting-default_archive_content', 'full');
    ?>
			<?php 
    if ('full' == $entry_content_display) {
        ?>
				<?php 
        the_content();
        ?>
			<?php 
    } elseif ('excerpt' == $entry_content_display) {
        ?>
				<?php 
        the_excerpt();
        ?>
			<?php 
    }