get_queried_object_id(); if ( $enablecontent == 'entire-site' || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && $enablecontent == 'homepage' ) ) { if ( ( !$automobile_featured_content = get_transient( 'automobile_featured_content' ) ) ) { $layouts = $options ['featured_content_layout']; $headline = $options ['featured_content_headline']; $subheadline = $options ['featured_content_subheadline']; echo ''; if ( !empty( $layouts ) ) { $classes = $layouts ; } if ( $contentselect == 'demo-featured-content' ) { $classes .= ' demo-featured-content' ; $headline = __( 'Featured Content', 'automobile' ); $subheadline = __( 'Here you can showcase the x number of Featured Content. You can edit this Headline, Subheadline and Feaured Content from "Appearance -> Customize -> Featured Content Options".', 'automobile' ); } else if ( $contentselect == 'featured-post-content' ) { $classes .= ' featured-post-content' ; } elseif ( $contentselect == 'featured-page-content' ) { $classes .= ' featured-page-content' ; } elseif ( $contentselect == 'featured-category-content' ) { $classes .= ' featured-category-content' ; } elseif ( $contentselect == 'featured-image-content' ) { $classes .= ' featured-image-content' ; } $featured_content_position = $options [ 'featured_content_position' ]; if ( '1' == $featured_content_position ) { $classes .= ' border-top' ; } $automobile_featured_content =' '; set_transient( 'automobile_featured_content', $automobile_featured_content, 86940 ); } echo $automobile_featured_content; } } endif; if ( ! function_exists( 'automobile_featured_content_display_position' ) ) : /** * Homepage Featured Content Position * * @action automobile_content, automobile_after_secondary * * @since Automobile 0.1 */ function automobile_featured_content_display_position() { // Getting data from Theme Options $options = automobile_get_theme_options(); $featured_content_position = $options [ 'featured_content_position' ]; if ( '1' != $featured_content_position ) { add_action( 'automobile_before_content', 'automobile_featured_content_display', 40 ); } else { add_action( 'automobile_after_content', 'automobile_featured_content_display', 30 ); } } endif; // automobile_featured_content_display_position add_action( 'automobile_before', 'automobile_featured_content_display_position' ); if ( ! function_exists( 'automobile_demo_content' ) ) : /** * This function to display featured posts content * * @get the data value from customizer options * * @since Automobile 0.1 * */ function automobile_demo_content( $options ) { $automobile_demo_content = '

Travel Map

A map is a picture or representation of the Earth\'s surface, showing how things are related to each other by distance, direction, and size. Create a travel map to record your experiences. Read More ...

Volkswagen Camper

The Volkswagen Camper gives you freedom. Whether you are into extreme sports, family fun or simply escaping for the weekend, discover new journeys with the Volkswagen. Read More ...

Best Beaches

We can all agree that after months of polar vortexes and a winter that refused to quit, the idea of hitting the beach sounds pretty terrific, right? Calm, warm waters, gently sloping sand. Read More ...

'; if( 'layout-four' == $options ['featured_content_layout'] || 'layout-two' == $options ['featured_content_layout'] ) { $automobile_demo_content .= '

Santorini Island

Santorini is an island in the southern Aegean Sea, about 200 km (120 mi) southeast of Greece\'s mainland. The two main sources of wealth in Santorini are agriculture and tourism. Read More ...

'; } return $automobile_demo_content; } endif; // automobile_demo_content if ( ! function_exists( 'automobile_page_content' ) ) : /** * This function to display featured page content * * @param $options: automobile_theme_options from customizer * * @since Automobile 0.1 */ function automobile_page_content( $options ) { global $post; $quantity = $options [ 'featured_content_number' ]; $more_link_text = $options['excerpt_more_text']; $show_content = isset( $options['featured_content_show'] ) ? $options['featured_content_show'] : 'excerpt'; $number_of_page = 0; // for number of pages $page_list = array(); // list of valid pages ids $automobile_page_content = ''; //Get valid pages for( $i = 1; $i <= $quantity; $i++ ){ if( isset ( $options['featured_content_page_' . $i] ) && $options['featured_content_page_' . $i] > 0 ){ $number_of_page++; $page_list = wp_parse_args( $page_list, array( $options['featured_content_page_' . $i] ) ); } } if ( !empty( $page_list ) && $number_of_page > 0 ) { $get_featured_posts = new WP_Query( array( 'posts_per_page' => $number_of_page, 'post__in' => $page_list, 'orderby' => 'post__in', 'post_type' => 'page', )); $i=0; while ( $get_featured_posts->have_posts()) : $get_featured_posts->the_post(); $i++; $title_attribute = the_title_attribute( array( 'before' => __( 'Permalink to: ', 'automobile' ), 'echo' => false ) ); $excerpt = get_the_excerpt(); $automobile_page_content .= '
'; if ( has_post_thumbnail() ) { $automobile_page_content .= ' '; } else { $automobile_first_image = automobile_get_first_image( $post->ID, 'post-thumbnail', array( 'title' => esc_attr( $title_attribute ), 'alt' => esc_attr( $title_attribute ), 'class' => 'pngfix' ) ); if ( '' != $automobile_first_image ) { $automobile_page_content .= ' '; } } $automobile_page_content .= '

' . the_title( '','', false ) . '

'; if ( 'excerpt' == $show_content ) { $automobile_page_content .= '

' . $excerpt . '

'; } elseif ( 'full-content' == $show_content ) { $content = apply_filters( 'the_content', get_the_content() ); $content = str_replace( ']]>', ']]>', $content ); $automobile_page_content .= '
' . $content . '
'; } $automobile_page_content .= '
'; endwhile; wp_reset_query(); } return $automobile_page_content; } endif; // automobile_page_content