Пример #1
0
<?php 
if (!kadence_hide_pagetitle()) {
} else {
    global $post, $pinnacle;
    $bsub = get_post_meta($post->ID, '_kad_subtitle', true);
    $shortcode_slider = get_post_meta($post->ID, '_kad_shortcode_slider', true);
    $post_header_title = get_post_meta($post->ID, '_kad_post_header_title', true);
    $title_color = get_post_meta($post->ID, '_kad_pagetitle_title_color', true);
    $sub_color = get_post_meta($post->ID, '_kad_pagetitle_sub_color', true);
    $title_align = get_post_meta($post->ID, '_kad_pagetitle_align', true);
    $bg_color = get_post_meta($post->ID, '_kad_pagetitle_bg_color', true);
    $bg_image = get_post_meta($post->ID, '_kad_pagetitle_bg_image', true);
    $bg_position = get_post_meta($post->ID, '_kad_pagetitle_bg_position', true);
    $bg_repeat = get_post_meta($post->ID, '_kad_pagetitle_bg_repeat', true);
    $bg_cover = get_post_meta($post->ID, '_kad_pagetitle_bg_cover', true);
    $bg_parallax = get_post_meta($post->ID, '_kad_pagetitle_bg_parallax', true);
    $top_padding = get_post_meta($post->ID, '_kad_pagetitle_ptop', true);
    $bottom_padding = get_post_meta($post->ID, '_kad_pagetitle_pbottom', true);
    if (!empty($title_color) && $title_color != '#') {
        $tcolor = 'color:' . $title_color . ';';
    } else {
        $tcolor = '';
    }
    if (!empty($sub_color) && $sub_color != '#') {
        $scolor = 'color:' . $sub_color . ';';
    } else {
        $scolor = '';
    }
    if (!empty($bg_color) && $bg_color != '#') {
        $bcolor = 'background-color:' . $bg_color . ';';
Пример #2
0
function kadence_pagetitle_behind_header()
{
    if (!kadence_hide_pagetitle()) {
        $pageheaderbg = false;
    } else {
        if (is_front_page()) {
            global $pinnacle;
            if (isset($pinnacle['hs_behindheader']) && $pinnacle['hs_behindheader'] == '0') {
                $pageheaderbg = false;
            } else {
                $pageheaderbg = true;
            }
        } elseif (is_page() || is_single() || is_singular()) {
            global $post, $pinnacle;
            $hs_behind = get_post_meta($post->ID, '_kad_pagetitle_behind_head', true);
            if (isset($hs_behind) && $hs_behind == 'true') {
                $pageheaderbg = true;
            } else {
                if (isset($hs_behind) && $hs_behind == 'false') {
                    $pageheaderbg = false;
                } else {
                    if (isset($pinnacle['pagetitle_intoheader']) && $pinnacle['pagetitle_intoheader'] == '0') {
                        $pageheaderbg = false;
                    } else {
                        $pageheaderbg = true;
                    }
                }
            }
        } else {
            global $pinnacle;
            if (isset($pinnacle['pagetitle_intoheader']) && $pinnacle['pagetitle_intoheader'] == '0') {
                $pageheaderbg = false;
            } else {
                $pageheaderbg = true;
            }
        }
    }
    return apply_filters('kadence_pagetitle_behindheader', $pageheaderbg);
}