$slide1_image_url, 'slide_title' => $slide1_title, 'slide_desc' => $slide1_desc, 'slide_link' => $slide1_link ), array( 'slide_image_url' => $slide2_image_url, 'slide_title' => $slide2_title, 'slide_desc' => $slide2_desc, 'slide_link' => $slide2_link ), array( 'slide_image_url' => $slide3_image_url, 'slide_title' => $slide3_title, 'slide_desc' => $slide3_desc, 'slide_link' => $slide3_link ), ); foreach ($thinkup_homepage_sliderpage as $slide) { if ( ! empty( $slide['slide_image_url'] ) ) { // Get url of background image or set video overlay image $slide_image = 'background: url(' . esc_url( $slide['slide_image_url'] ) . ') no-repeat center; background-size: cover;'; // Used for slider image alt text if ( ! empty( $slide['slide_title'] ) ) { $slide_alt = $slide['slide_title']; } else { $slide_alt = __( 'Slider Image', 'alante' ); } echo '
  • ', '' . esc_attr( $slide_alt ) . '', '
    ', '
    ', '
    ', '', '
    ', '
    ', '
    ', '
  • '; } } } // Add Slider - Homepage function alante_thinkup_input_sliderhome() { // Get theme options values. $thinkup_homepage_sliderswitch = alante_thinkup_var ( 'thinkup_homepage_sliderswitch' ); $thinkup_homepage_sliderimage1_image = alante_thinkup_var ( 'thinkup_homepage_sliderimage1_image', 'url' ); $thinkup_homepage_sliderimage2_image = alante_thinkup_var ( 'thinkup_homepage_sliderimage2_image', 'url' ); $thinkup_homepage_sliderimage3_image = alante_thinkup_var ( 'thinkup_homepage_sliderimage3_image', 'url' ); $slider_default = NULL; if ( is_front_page() ) { // Set default slider $slider_default .= '
  • ' . esc_attr__( 'Demo Image', 'alante' ) . '
  • '; $slider_default .= '
  • ' . esc_attr__( 'Demo Image', 'alante' ) . '
  • '; $slider_default .= '
  • ' . esc_attr__( 'Demo Image', 'alante' ) . '
  • '; if ( ( alante_thinkup_check_permission() and empty( $thinkup_homepage_sliderswitch ) ) or $thinkup_homepage_sliderswitch == 'option1' ) { echo '
    '; echo '
      '; echo $slider_default; echo '
    '; echo '
    '; } else if ( $thinkup_homepage_sliderswitch == 'option2' ) { echo ''; } else if ( $thinkup_homepage_sliderswitch == 'option3' ) { echo ''; } else if ( $thinkup_homepage_sliderswitch == 'option4' ) { // Check if page slider has been set if( empty( $thinkup_homepage_sliderimage1_image ) and empty( $thinkup_homepage_sliderimage2_image ) and empty( $thinkup_homepage_sliderimage3_image ) ) { echo '
    '; echo '
      '; echo $slider_default; echo '
    '; echo '
    '; } else { echo '
    '; echo '
      '; alante_thinkup_input_sliderhomepage(); echo '
    '; echo '
    '; } } } } // Add ThinkUpSlider Height - Homepage function alante_thinkup_input_sliderhomeheight() { // Get theme options values. $thinkup_homepage_sliderswitch = alante_thinkup_var ( 'thinkup_homepage_sliderswitch' ); $thinkup_homepage_sliderpresetheight = alante_thinkup_var ( 'thinkup_homepage_sliderpresetheight' ); if ( empty( $thinkup_homepage_sliderpresetheight ) ) $thinkup_homepage_sliderpresetheight = '350'; if ( is_front_page() ) { if ( empty( $thinkup_homepage_sliderswitch ) or $thinkup_homepage_sliderswitch == 'option1' or $thinkup_homepage_sliderswitch == 'option4' ) { echo "\n" .'' . "\n"; } } } add_action( 'wp_head','alante_thinkup_input_sliderhomeheight', '13' ); //---------------------------------------------------------------------------------- // ENABLE HOMEPAGE CONTENT //---------------------------------------------------------------------------------- function alante_thinkup_input_homepagesection() { // Get theme options values. $thinkup_homepage_sectionswitch = alante_thinkup_var ( 'thinkup_homepage_sectionswitch' ); $thinkup_homepage_section1_image = alante_thinkup_var ( 'thinkup_homepage_section1_image', 'id' ); $thinkup_homepage_section1_title = alante_thinkup_var ( 'thinkup_homepage_section1_title' ); $thinkup_homepage_section1_desc = alante_thinkup_var ( 'thinkup_homepage_section1_desc' ); $thinkup_homepage_section1_link = alante_thinkup_var ( 'thinkup_homepage_section1_link' ); $thinkup_homepage_section2_image = alante_thinkup_var ( 'thinkup_homepage_section2_image', 'id' ); $thinkup_homepage_section2_title = alante_thinkup_var ( 'thinkup_homepage_section2_title' ); $thinkup_homepage_section2_desc = alante_thinkup_var ( 'thinkup_homepage_section2_desc' ); $thinkup_homepage_section2_link = alante_thinkup_var ( 'thinkup_homepage_section2_link' ); $thinkup_homepage_section3_image = alante_thinkup_var ( 'thinkup_homepage_section3_image', 'id' ); $thinkup_homepage_section3_title = alante_thinkup_var ( 'thinkup_homepage_section3_title' ); $thinkup_homepage_section3_desc = alante_thinkup_var ( 'thinkup_homepage_section3_desc' ); $thinkup_homepage_section3_link = alante_thinkup_var ( 'thinkup_homepage_section3_link' ); // Set default values for images $imagesize1 = 'alante-thinkup-column3-2/3'; $imagesize2 = 'alante-thinkup-column3-2/3'; $imagesize3 = 'alante-thinkup-column3-2/3'; if ( ! empty( $thinkup_homepage_section1_image ) ) { $thinkup_homepage_section1_image = wp_get_attachment_image_src( $thinkup_homepage_section1_image, $imagesize1 ); } if ( ! empty( $thinkup_homepage_section2_image ) ) { $thinkup_homepage_section2_image = wp_get_attachment_image_src( $thinkup_homepage_section2_image, $imagesize2 ); } if ( ! empty( $thinkup_homepage_section3_image ) ) { $thinkup_homepage_section3_image = wp_get_attachment_image_src( $thinkup_homepage_section3_image, $imagesize3 ); } // Set default values for titles if ( empty( $thinkup_homepage_section1_title ) ) $thinkup_homepage_section1_title = __( 'Step 1 - Theme Options', 'alante' ); if ( empty( $thinkup_homepage_section2_title ) ) $thinkup_homepage_section2_title = __( 'Step 2 - Setup Slider', 'alante' ); if ( empty( $thinkup_homepage_section3_title ) ) $thinkup_homepage_section3_title = __( 'Step 3 - Create Homepage', 'alante' ); // Set default values for descriptions if ( empty( $thinkup_homepage_section1_desc ) ) $thinkup_homepage_section1_desc = __( 'To begin customizing your site go to Appearance -> Customizer and select Theme Options. Here's you'll find custom options to help build your site.', 'alante' ); if ( empty( $thinkup_homepage_section2_desc ) ) $thinkup_homepage_section2_desc = __( 'To add a slider go to Theme Options -> Homepage and choose page slider. The slider will use the page title, excerpt and featured image for the slides.', 'alante' ); if ( empty( $thinkup_homepage_section3_desc ) ) $thinkup_homepage_section3_desc = __( 'To add featured content go to Theme Options -> Homepage (Featured) and turn the switch on then add the content you want for each section.', 'alante' ); // Get page names for links if ( ! empty( $thinkup_homepage_section1_link ) ) { $thinkup_homepage_section1_link = get_permalink( $thinkup_homepage_section1_link ); } if ( ! empty( $thinkup_homepage_section2_link ) ) { $thinkup_homepage_section2_link = get_permalink( $thinkup_homepage_section2_link ); } if ( ! empty( $thinkup_homepage_section3_link ) ) { $thinkup_homepage_section3_link = get_permalink( $thinkup_homepage_section3_link ); } // Output featured content areas if ( is_front_page() ) { if ( ( alante_thinkup_check_permission() and empty( $thinkup_homepage_sectionswitch ) ) or $thinkup_homepage_sectionswitch == '1' ) { echo '
    '; echo '
    ', '
    ', '
    '; if ( empty( $thinkup_homepage_section1_image ) ) { echo '' . esc_attr__( 'Placeholder Image 1', 'alante') . ''; } else { if ( ! empty( $thinkup_homepage_section1_link ) ) { echo '' . esc_attr( $thinkup_homepage_section1_title ) . ''; } else { echo '' . esc_attr( $thinkup_homepage_section1_title ) . ''; } } echo '
    ', '
    ', '

    ' . esc_html( $thinkup_homepage_section1_title ) . '

    ' . wpautop( esc_html( do_shortcode ( $thinkup_homepage_section1_desc ) ) ); if ( ! empty( $thinkup_homepage_section1_link ) ) { echo '

    ' . __( 'Read More', 'alante' ) . '

    '; } echo '
    ', '
    ', '
    '; echo '
    ', '
    ', '
    '; if ( empty( $thinkup_homepage_section2_image ) ) { echo '' . esc_attr__( 'Placeholder Image 2', 'alante') . ''; } else { if ( ! empty( $thinkup_homepage_section2_link ) ) { echo '' . esc_attr( $thinkup_homepage_section2_title ) . ''; } else { echo '' . esc_attr( $thinkup_homepage_section2_title ) . ''; } } echo '
    ', '
    ', '

    ' . esc_html( $thinkup_homepage_section2_title ) . '

    ' . wpautop( esc_html( do_shortcode ( $thinkup_homepage_section2_desc ) ) ); if ( ! empty( $thinkup_homepage_section2_link ) ) { echo '

    ' . __( 'Read More', 'alante' ) . '

    '; } echo '
    ', '
    ', '
    '; echo '
    ', '
    ', '
    '; if ( empty( $thinkup_homepage_section3_image ) ) { echo '' . esc_attr__( 'Placeholder Image 3', 'alante') . ''; } else { if ( ! empty( $thinkup_homepage_section3_link ) ) { echo '' . esc_attr( $thinkup_homepage_section3_title ) . ''; } else { echo '' . esc_attr( $thinkup_homepage_section3_title ) . ''; } } echo '
    ', '
    ', '

    ' . esc_html( $thinkup_homepage_section3_title ) . '

    ' . wpautop( esc_html( do_shortcode ( $thinkup_homepage_section3_desc ) ) ); if ( ! empty( $thinkup_homepage_section3_link ) ) { echo '

    ' . __( 'Read More', 'alante' ) . '

    '; } echo '
    ', '
    ', '
    '; echo '
    '; } } } /* ---------------------------------------------------------------------------------- CALL TO ACTION - INTRO ---------------------------------------------------------------------------------- */ function alante_thinkup_input_ctaintro() { // Get theme options values. $thinkup_homepage_introswitch = alante_thinkup_var ( 'thinkup_homepage_introswitch' ); $thinkup_homepage_introaction = alante_thinkup_var ( 'thinkup_homepage_introaction' ); $thinkup_homepage_introactionteaser = alante_thinkup_var ( 'thinkup_homepage_introactionteaser' ); $thinkup_homepage_introactionbutton = alante_thinkup_var ( 'thinkup_homepage_introactionbutton' ); $thinkup_homepage_introactionlink = alante_thinkup_var ( 'thinkup_homepage_introactionlink' ); $thinkup_homepage_introactionpage = alante_thinkup_var ( 'thinkup_homepage_introactionpage' ); $thinkup_homepage_introactioncustom = alante_thinkup_var ( 'thinkup_homepage_introactioncustom' ); if ( $thinkup_homepage_introswitch == '1' and is_front_page() and ! empty( $thinkup_homepage_introaction ) ) { echo '
    '; if ( empty( $thinkup_homepage_introactionbutton ) ) { if ( empty( $thinkup_homepage_introactionteaser ) ) { echo '
    ', '

    ' . esc_html( $thinkup_homepage_introaction ) . '

    ', '
    '; } else { echo '
    ', '

    ' . esc_html( $thinkup_homepage_introaction ) . '

    ', wpautop( esc_html( $thinkup_homepage_introactionteaser ) ), '
    '; } } else if ( ! empty( $thinkup_homepage_introactionbutton ) ) { if ( empty( $thinkup_homepage_introactionteaser ) ) { echo '
    ', '

    ' . esc_html( $thinkup_homepage_introaction ) . '

    ', '
    '; } else { echo '
    ', '

    ' . esc_html( $thinkup_homepage_introaction ) . '

    ', wpautop( esc_html( $thinkup_homepage_introactionteaser ) ), '
    '; } if ( $thinkup_homepage_introactionlink == 'option1' ) { echo ''; } else if ( $thinkup_homepage_introactionlink == 'option2' ) { echo ''; } } echo '
    '; } } /* ---------------------------------------------------------------------------------- CALL TO ACTION - OUTRO ---------------------------------------------------------------------------------- */ function alante_thinkup_input_ctaoutro() { // Get theme options values. $thinkup_homepage_outroswitch = alante_thinkup_var ( 'thinkup_homepage_outroswitch' ); $thinkup_homepage_outroaction = alante_thinkup_var ( 'thinkup_homepage_outroaction' ); $thinkup_homepage_outroactionteaser = alante_thinkup_var ( 'thinkup_homepage_outroactionteaser' ); $thinkup_homepage_outroactionbutton = alante_thinkup_var ( 'thinkup_homepage_outroactionbutton' ); $thinkup_homepage_outroactionlink = alante_thinkup_var ( 'thinkup_homepage_outroactionlink' ); $thinkup_homepage_outroactionpage = alante_thinkup_var ( 'thinkup_homepage_outroactionpage' ); $thinkup_homepage_outroactioncustom = alante_thinkup_var ( 'thinkup_homepage_outroactioncustom' ); if ( $thinkup_homepage_outroswitch == '1' and is_front_page() and ! empty( $thinkup_homepage_outroaction ) ) { echo '
    '; if ( empty( $thinkup_homepage_outroactionbutton ) ) { if ( empty( $thinkup_homepage_outroactionbutton ) ) { echo '
    ', '

    ' . esc_html( $thinkup_homepage_outroaction ) . '

    ', '
    '; } else { echo '
    ', '

    ' . esc_html( $thinkup_homepage_outroaction ) . '

    ', wpautop( esc_html( $thinkup_homepage_outroactionteaser ) ), '
    '; } } else if ( ! empty( $thinkup_homepage_outroactionbutton ) ) { if ( empty( $thinkup_homepage_outroactionteaser ) ) { echo '
    ', '

    ' . esc_html( $thinkup_homepage_outroaction ) . '

    ', '
    '; } else { echo '
    ', '

    ' . esc_html( $thinkup_homepage_outroaction ) . '

    ', wpautop( esc_html( $thinkup_homepage_outroactionteaser ) ), '
    '; } if ( $thinkup_homepage_outroactionlink == 'option1' ) { echo ''; } else if ($thinkup_homepage_outroactionlink == 'option2') { echo ''; } } echo '
    '; } }