/** * Load start of theme wrapper function */ function terrifico_theme_wrapper_start() { $terrifico_theme_options = terrifico_get_options('terrifico_theme_options'); ?> <div id="main" class="<?php echo $terrifico_theme_options['layout_settings']; ?> "> <div class="content-posts-wrap"> <div class="woocommerce"> <div id="content-box"> <div id="post-body"> <div class="post-single"> <?php }
<?php /** * @package Terrifico * */ $terrifico_theme_options = terrifico_get_options('terrifico_theme_options'); if (have_posts()) { ?> <div class="clear"></div> <div class="content-posts-wrap"> <div class="standard-posts-wrapper"> <div class="posts-wrapper"> <div id="post-body"> <div class="post-single"> <?php // Start the Loop. while (have_posts()) { the_post(); get_template_part('content'); } if ($terrifico_theme_options['simple_paginaton'] == '1') { // Displays links for next and previous pages. ?> <div class="clear"></div> <div class="simple-pagination"> <?php posts_nav_link(); ?> </div> <?php } else {
/** * Load function to change excerpt length * */ function terrifico_excerpt_length($length) { $terrifico_theme_options = terrifico_get_options('terrifico_theme_options'); if ($terrifico_theme_options['blog_excerpt'] != "") { $excrpt = $terrifico_theme_options['blog_excerpt']; return $excrpt; } else { $excrpt = '50'; return $excrpt; } }
/** * Sets up theme custom styling * */ function terrifico_theme_custom_styling() { $terrifico_theme_options = terrifico_get_options('terrifico_theme_options'); /** * General Settings */ $theme_color = $terrifico_theme_options['theme_color']; $scrollup_color = $terrifico_theme_options['scrollup_color']; $scrollup_hover_color = $terrifico_theme_options['scrollup_hover_color']; /** * Logo Settings */ $logo_width = $terrifico_theme_options['logo_width']; $logo_height = $terrifico_theme_options['logo_height']; $logo_top_margin = $terrifico_theme_options['logo_top_margin']; $logo_left_margin = $terrifico_theme_options['logo_left_margin']; $logo_bottom_margin = $terrifico_theme_options['logo_bottom_margin']; $logo_right_margin = $terrifico_theme_options['logo_right_margin']; $logo_uppercase = $terrifico_theme_options['logo_uppercase']; $google_font_logo = $terrifico_theme_options['google_font_logo']; $logo_font_size = $terrifico_theme_options['logo_font_size']; $logo_font_weight = $terrifico_theme_options['logo_font_weight']; $text_logo_color = $terrifico_theme_options['text_logo_color']; $tagline_font_size = $terrifico_theme_options['tagline_font_size']; $tagline_color = $terrifico_theme_options['tagline_color']; $tagline_uppercase = $terrifico_theme_options['tagline_uppercase']; /** * Navigation Settings */ $menu_sticky = $terrifico_theme_options['menu_sticky']; $menu_top_margin = $terrifico_theme_options['menu_top_margin']; $google_font_menu = $terrifico_theme_options['google_font_menu']; $nav_font_size = $terrifico_theme_options['nav_font_size']; $menu_uppercase = $terrifico_theme_options['menu_uppercase']; $nav_font_color = $terrifico_theme_options['nav_font_color']; $nav_border_color = $terrifico_theme_options['nav_border_color']; $nav_bg_color = $terrifico_theme_options['nav_bg_color']; $nav_bg_sub_color = $terrifico_theme_options['nav_bg_sub_color']; $nav_hover_font_color = $terrifico_theme_options['nav_hover_font_color']; $nav_bg_hover_color = $terrifico_theme_options['nav_bg_hover_color']; $nav_cur_item_color = $terrifico_theme_options['nav_cur_item_color']; /** * Typography Settings */ $google_font_body = $terrifico_theme_options['google_font_body']; $body_font_size = $terrifico_theme_options['body_font_size']; $body_font_color = $terrifico_theme_options['body_font_color']; /** * Header Settings */ $header_bg_color = $terrifico_theme_options['header_bg_color']; $header_opacity = $terrifico_theme_options['header_opacity']; $address_color = $terrifico_theme_options['address_color']; $top_head_color = $terrifico_theme_options['top_head_color']; /** * Image Slider */ $slider_height = $terrifico_theme_options['slider_height']; $captions_pos_left = $terrifico_theme_options['captions_pos_left']; $captions_pos_top = $terrifico_theme_options['captions_pos_top']; $captions_width = $terrifico_theme_options['captions_width']; $captions_title_color = $terrifico_theme_options['captions_title_color']; $captions_text_color = $terrifico_theme_options['captions_text_color']; $captions_button_color = $terrifico_theme_options['captions_button_color']; /** * Footer Settings */ $footer_bg_color = $terrifico_theme_options['footer_bg_color']; $copyright_bg_color = $terrifico_theme_options['copyright_bg_color']; $footer_widget_title_color = $terrifico_theme_options['footer_widget_title_color']; $footer_widget_title_border_color = $terrifico_theme_options['footer_widget_title_border_color']; $footer_widget_text_color = $terrifico_theme_options['footer_widget_text_color']; $footer_widget_text_border_color = $terrifico_theme_options['footer_widget_text_border_color']; $footer_social_color = $terrifico_theme_options['footer_social_color']; /** * Blog Settings */ $blog_posts_home_color = $terrifico_theme_options['blog_posts_home_color']; $blog_bg_color = $terrifico_theme_options['blog_bg_color']; $blog_title_color = $terrifico_theme_options['blog_title_color']; $blog_post_color = $terrifico_theme_options['blog_post_color']; $blog_meta_color = $terrifico_theme_options['blog_meta_color']; $blog_posts_top_color = $terrifico_theme_options['blog_posts_top_color']; $blog_posts_top_font_color = $terrifico_theme_options['blog_posts_top_font_color']; /** * Get Started Section */ $getst_bg_color = $terrifico_theme_options['getst_bg_color']; $getst_header_color = $terrifico_theme_options['getst_header_color']; $getst_text_color = $terrifico_theme_options['getst_text_color']; $getst_button_color = $terrifico_theme_options['getst_button_color']; /** * Features Section */ $features_bg_color = $terrifico_theme_options['features_bg_color']; $features_text_color = $terrifico_theme_options['features_text_color']; $features_title_color = $terrifico_theme_options['features_title_color']; /** * About Section */ $about_text_color = $terrifico_theme_options['about_text_color']; $about_bg_color = $terrifico_theme_options['about_bg_color']; $about_header_color = $terrifico_theme_options['about_header_color']; /** * Our Services Section */ $services_bg_color = $terrifico_theme_options['services_bg_color']; $services_title_color = $terrifico_theme_options['services_title_color']; $services_text_color = $terrifico_theme_options['services_text_color']; /** * Call To Action Section */ $cta_bg_color = $terrifico_theme_options['cta_bg_color']; $cta_sm_color = $terrifico_theme_options['cta_sm_color']; $cta_big_color = $terrifico_theme_options['cta_big_color']; /** * Content Boxes Section */ $cont_text_color = $terrifico_theme_options['cont_text_color']; $cont_bg_color = $terrifico_theme_options['cont_bg_color']; $cntbx_title_color = $terrifico_theme_options['cntbx_title_color']; /** * Get in Touch Section */ $getin_header_color = $terrifico_theme_options['getin_header_color']; $getin_text_color = $terrifico_theme_options['getin_text_color']; $getin_button_color = $terrifico_theme_options['getin_button_color']; $getin_bg_color = $terrifico_theme_options['getin_bg_color']; /** * Social Section */ $social_color = $terrifico_theme_options['social_color']; $output = ''; /** * General Settings */ if ($theme_color) { $output .= 'blockquote, address, .page-links a:hover, .post-format-wrap {border-color:' . $theme_color . '}' . "\n"; } $output .= '.meta span i, .more-link, .post-title h3:hover, #main .standard-posts-wrapper .posts-wrapper .post-single .text-holder-full .post-format-wrap p.link-text a:hover, .breadcrumbs .breadcrumbs-wrap ul li a:hover, #article p a, .navigation a, .link-post i.fa, .quote-post i.fa, #article .link-post p.link-text a:hover, .link-post p.link-text a:hover, .quote-post span.quote-author, .post-single ul.link-pages li a strong, .post-info span i, .footer-widget-col ul li a:hover, .sidebar ul.link-pages li.next-link a span, .sidebar ul.link-pages li.previous-link a span, .sidebar ul.link-pages li i, .row .row-item .service i.fa {color:' . $theme_color . '}' . "\n"; $output .= 'input[type="submit"],button, .page-links a:hover {background:' . $theme_color . '}' . "\n"; $output .= '.search-submit,.wpcf7-form-control,.main-navigation ul ul, .content-boxes .circle, .feature .circle, .section-title-right:after, .boxtitle:after, .section-title:after, .content-btn, #comments .form-submit #submit, .post-tags a, .service-box .service-icon {background-color:' . $theme_color . '}' . "\n"; if ($scrollup_color) { $output .= '.back-to-top {color:' . $scrollup_color . '}' . "\n"; } if ($scrollup_hover_color) { $output .= '.back-to-top i.fa:hover {color:' . $scrollup_hover_color . '}' . "\n"; } /** * Logo Settings */ if ($logo_width) { $output .= '#logo {width:' . $logo_width . 'px }' . "\n"; } if ($logo_height) { $output .= '#logo {height:' . $logo_height . 'px }' . "\n"; } if ($logo_top_margin) { $output .= '#logo { margin-top:' . $logo_top_margin . 'px }' . "\n"; } if ($logo_left_margin) { $output .= '#logo { margin-left:' . $logo_left_margin . 'px }' . "\n"; } if ($logo_bottom_margin) { $output .= '#logo { margin-bottom:' . $logo_bottom_margin . 'px }' . "\n"; } if ($logo_right_margin) { $output .= '#logo { margin-right:' . $logo_right_margin . 'px }' . "\n"; } if ($logo_uppercase == '1') { $output .= '#logo {text-transform: uppercase }' . "\n"; } if ($google_font_logo) { $output .= '#logo {font-family:' . $google_font_logo . '}' . "\n"; } if ($logo_font_size) { $output .= '#logo {font-size:' . $logo_font_size . 'px }' . "\n"; } if ($logo_font_weight) { $output .= '#logo {font-weight:' . $logo_font_weight . '}' . "\n"; } if ($text_logo_color) { $output .= '#logo a {color:' . $text_logo_color . '}' . "\n"; } if ($tagline_font_size) { $output .= '#logo h5.site-description {font-size:' . $tagline_font_size . 'px }' . "\n"; } if ($tagline_color) { $output .= '#logo .site-description {color:' . $tagline_color . '}' . "\n"; } if ($tagline_uppercase == '0') { $output .= '#logo .site-description {text-transform: none}' . "\n"; } if ($tagline_uppercase == '1') { $output .= '#logo .site-description {text-transform: uppercase}' . "\n"; } /** * Navigation Settings */ if ($menu_top_margin) { $output .= '#site-navigation #menu-main-navigation {margin-top:' . $menu_top_margin . 'px}' . "\n"; } if ($google_font_menu) { $output .= '#site-navigation ul li a {font-family:' . $google_font_menu . '}' . "\n"; } if ($nav_font_size) { $output .= '#site-navigation ul li a {font-size:' . $nav_font_size . 'px}' . "\n"; } if ($menu_uppercase == '1') { $output .= '#site-navigation ul li a {text-transform: uppercase;}' . "\n"; } if ($nav_font_color) { $output .= '#site-navigation ul li a {color:' . $nav_font_color . '}' . "\n"; } if ($nav_border_color) { $output .= '#site-navigation ul li ul.sub-menu ul.sub-menu {border-bottom: 5px solid ' . $nav_border_color . '}' . "\n"; } $output .= '#site-navigation ul li ul.sub-menu {border-bottom: 5px solid ' . $nav_border_color . '}' . "\n"; if ($nav_bg_color) { $output .= '#menu-main-navigation {background-color:' . $nav_bg_color . '}' . "\n"; } if ($nav_bg_sub_color) { $output .= '#site-navigation ul li ul.sub-menu { background:' . $nav_bg_sub_color . '}' . "\n"; } if ($nav_hover_font_color) { $output .= '#site-navigation ul li a:hover {color:' . $nav_hover_font_color . '}' . "\n"; } if ($nav_bg_hover_color) { $output .= '#site-navigation ul li a:hover, #site-navigation ul li a:focus, #site-navigation ul li a.active, #site-navigation ul li a.active-parent, #site-navigation ul li.current_page_item a { background:' . $nav_bg_hover_color . '}' . "\n"; } if ($nav_cur_item_color) { $output .= '#menu-main-navigation .current-menu-item a { color:' . $nav_cur_item_color . '}' . "\n"; } /** * Typography Settings */ if ($google_font_body != 'None') { $output .= 'body {font-family:' . $google_font_body . '}' . "\n"; } if ($body_font_size) { $output .= 'body {font-size:' . $body_font_size . 'px !important}' . "\n"; } if ($body_font_color) { $output .= 'body {color:' . $body_font_color . '}' . "\n"; } /** * Header Settings */ if ($header_bg_color) { $output .= '#header-holder { background-color: ' . $header_bg_color . '}' . "\n"; } if ($header_opacity) { $output .= '#header-holder {opacity:' . $header_opacity . '}' . "\n"; } if ($address_color) { $output .= '#header-top .top-phone,#header-top p, #header-top a, #header-top i { color:' . $address_color . '}' . "\n"; } if ($top_head_color) { $output .= '#header-top { background-color: ' . $top_head_color . '}' . "\n"; } /** * Image Slider */ if ($slider_height) { $output .= '.da-slider { height:' . $slider_height . 'px;}' . "\n"; } if ($captions_title_color) { $output .= '.da-slider .da-slide-wrap h2, .flexslider .post-title h2 { color:' . $captions_title_color . '}' . "\n"; } if ($captions_text_color) { $output .= '.da-slider .da-slide-wrap p, .flexslider .posts-featured-details-wrapper div p { color: ' . $captions_text_color . '}' . "\n"; } if ($captions_button_color) { $output .= '.da-slider .da-slide-wrap .da-link, .flexslider .da-link { color: ' . $captions_button_color . '}' . "\n"; } $output .= '.da-slider .da-slide-wrap .da-link, .flexslider .da-link { border-color: ' . $captions_button_color . '}' . "\n"; if ($captions_pos_left) { $output .= '.posts-featured-details-wrapper { left: ' . $captions_pos_left . '%}' . "\n"; } if ($captions_pos_top) { $output .= '.posts-featured-details-wrapper { top: ' . $captions_pos_top . '%}' . "\n"; } if ($captions_width) { $output .= '.posts-featured-details-wrapper { width: ' . $captions_width . '%}' . "\n"; } /** * Footer Settings */ if ($footer_bg_color) { $output .= '#footer { background-color:' . $footer_bg_color . '}' . "\n"; } if ($copyright_bg_color) { $output .= '#copyright { background-color:' . $copyright_bg_color . '}' . "\n"; } if ($footer_widget_title_color) { $output .= '.footer-widget-col h4 { color:' . $footer_widget_title_color . '}' . "\n"; } if ($footer_widget_title_border_color) { $output .= '.footer-widget-col h4 { border-bottom: 4px solid ' . $footer_widget_title_border_color . '}' . "\n"; } if ($footer_widget_text_color) { $output .= '.footer-widget-col a, .footer-widget-col { color:' . $footer_widget_text_color . '}' . "\n"; } if ($footer_widget_text_border_color) { $output .= '.footer-widget-col ul li { border-bottom: 1px solid ' . $footer_widget_text_border_color . '}' . "\n"; } if ($footer_social_color) { $output .= '#social-bar-footer ul li a i { color:' . $footer_social_color . '}' . "\n"; } /** * Blog Settings */ if ($blog_posts_home_color) { $output .= '.home-blog {background: none repeat scroll 0 0 ' . $blog_posts_home_color . '}' . "\n"; } if ($blog_meta_color) { $output .= '.from-blog .post-info span a, .from-blog .post-info span {color:' . $blog_meta_color . ';}' . "\n"; } if ($blog_post_color) { $output .= '.from-blog h3 {color:' . $blog_post_color . ';}' . "\n"; } if ($blog_title_color) { $output .= '.from-blog h2 {color:' . $blog_title_color . ';}' . "\n"; } if ($blog_bg_color) { $output .= '.from-blog {background: none repeat scroll 0 0 ' . $blog_bg_color . ';}' . "\n"; } if ($blog_posts_top_color) { $output .= '.blog-top-image {background: none repeat scroll 0 0 ' . $blog_posts_top_color . ';}' . "\n"; } if ($blog_posts_top_font_color) { $output .= '.blog-top-image h1.section-title, .blog-top-image h1.section-title-right {color:' . $blog_posts_top_font_color . ';}' . "\n"; } /** * Get Started Section */ if ($getst_button_color) { $output .= '.get-strated-button { background-color: ' . $getst_button_color . '}' . "\n"; } if ($getst_header_color) { $output .= '#get-started h2 { color: ' . $getst_header_color . '}' . "\n"; } if ($getst_text_color) { $output .= '.get-strated-left span { color: ' . $getst_text_color . '}' . "\n"; } if ($getst_bg_color) { $output .= '#get-started { background: none repeat scroll 0 0 ' . $getst_bg_color . '}' . "\n"; } /** * Features Section */ if ($features_bg_color) { $output .= '#features { background-color:' . $features_bg_color . ';}' . "\n"; } if ($features_text_color) { $output .= 'h4.sub-title, #features p { color:' . $features_text_color . ';}' . "\n"; } if ($features_title_color) { $output .= '#features .section-title, #features h3 { color:' . $features_title_color . ';}' . "\n"; } /** * About Section */ if ($about_text_color) { $output .= '.about p {color:' . $about_text_color . ';}' . "\n"; } if ($about_header_color) { $output .= '.about h2 {color:' . $about_header_color . ';}' . "\n"; } if ($about_bg_color) { $output .= '.about {background: none repeat scroll 0 0 ' . $about_bg_color . ';}' . "\n"; } /** * Our Services Section */ if ($services_bg_color) { $output .= '#services { background-color:' . $services_bg_color . ';}' . "\n"; } if ($services_title_color) { $output .= '#services h2, #services h3 { color:' . $services_title_color . ';}' . "\n"; } if ($services_text_color) { $output .= '#services p { color:' . $services_text_color . ';}' . "\n"; } /** * Call To Action Section */ if ($cta_big_color) { $output .= '.cta h2 { color:' . $cta_big_color . ';}' . "\n"; } if ($cta_sm_color) { $output .= '.cta h4 { color:' . $cta_sm_color . ';}' . "\n"; } if ($cta_bg_color) { $output .= '.cta { background-color:' . $cta_bg_color . ';}' . "\n"; } /** * Content Boxes Section */ if ($cntbx_title_color) { $output .= '.content-boxes h4 { color:' . $cntbx_title_color . ';}' . "\n"; } if ($cont_text_color) { $output .= '.content-boxes {color:' . $cont_text_color . '}' . "\n"; } if ($cont_bg_color) { $output .= '.content-boxes {background: none repeat scroll 0 0 ' . $cont_bg_color . '}' . "\n"; } /** * Get in Touch Section */ if ($getin_bg_color) { $output .= '.get-in-touch { background-color: ' . $getin_bg_color . '}' . "\n"; } if ($getin_header_color) { $output .= '.get-in-touch h2.boxtitle {color:' . $getin_header_color . ';}' . "\n"; } if ($getin_text_color) { $output .= '.get-in-touch h4.sub-title {color:' . $getin_text_color . ';}' . "\n"; } if ($getin_button_color) { $output .= '.git-link { color: ' . $getin_button_color . '}' . "\n"; } $output .= '.git-link { border-color: ' . $getin_button_color . '}' . "\n"; /** * Social Section */ if ($social_color) { $output .= '.social { background-color: ' . $social_color . '}' . "\n"; } // Output styles if (isset($output) && $output != '') { $output = strip_tags($output); $output = "<!--Custom Styling-->\n<style media=\"screen\" type=\"text/css\">\n" . esc_html($output) . "</style>\n"; echo $output; } }
function terrifico_localize_scripts() { wp_enqueue_script('slides', get_template_directory_uri() . '/js/slides.js', array('jquery'), '', true); $terrifico_theme_options = terrifico_get_options('terrifico_theme_options'); $animation_speed = $terrifico_theme_options['animation_speed']; $slideshow_speed = $terrifico_theme_options['slideshow_speed']; $datatoBePassed = array('slideshowSpeed' => $slideshow_speed, 'animationSpeed' => $animation_speed); wp_localize_script('slides', 'php_vars', $datatoBePassed); }