コード例 #1
0
<?php

get_header();
if (have_posts()) {
    while (have_posts()) {
        the_post();
        $post_id = get_the_ID();
        $header_img_scr = ct_get_header_image_src($post_id);
        if (!empty($header_img_scr)) {
            $header_img_height = ct_get_header_image_height($post_id);
            $sidebar_position = ct_get_sidebar_position($post_id);
            $content_class = 'post-content';
            if ('no' != $sidebar_position) {
                $content_class .= ' col-md-9';
            }
            $header_content = get_post_meta($post_id, '_header_content', true);
            ?>

			<section class="parallax-window" data-parallax="scroll" data-image-src="<?php 
            echo esc_url($header_img_scr);
            ?>
" data-natural-width="1400" data-natural-height="<?php 
            echo esc_attr($header_img_height);
            ?>
">
				<div class="parallax-content-1">
					<?php 
            echo balancetags($header_content);
            ?>
				</div>
			</section><!-- End section -->
コード例 #2
0
<?php

get_header();
global $ct_options;
$header_img_scr = ct_get_header_image_src('blog');
if (!empty($header_img_scr)) {
    $header_img_height = ct_get_header_image_height('blog');
    $sidebar_position = ct_get_sidebar_position('blog');
    $content_class = '';
    if ('no' != $sidebar_position) {
        $content_class = 'col-md-9';
    }
    $header_content = '';
    if (!empty($ct_options['blog_header_content'])) {
        $header_content = $ct_options['blog_header_content'];
    }
    ?>

	<section class="parallax-window" data-parallax="scroll" data-image-src="<?php 
    echo esc_url($header_img_scr);
    ?>
" data-natural-width="1400" data-natural-height="<?php 
    echo esc_attr($header_img_height);
    ?>
">
		<div class="parallax-content-1">
			<?php 
    echo balancetags($header_content);
    ?>
		</div>
	</section><!-- End section -->