ID, 'travelify_sidebarlayout', true ); } if( empty( $layout ) || is_archive() || is_search() || is_home() ) { $layout = 'default'; } if( 'default' == $layout ) { $themeoption_layout = $options[ 'default_layout' ]; if( 'left-sidebar' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' ); } elseif( 'right-sidebar' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' ); } else { get_template_part( 'content','nosidebar' ); } } elseif( 'left-sidebar' == $layout ) { get_template_part( 'content','leftsidebar' ); } elseif( 'right-sidebar' == $layout ) { get_template_part( 'content','rightsidebar' ); } else { get_template_part( 'content','nosidebar' ); } } /****************************************************************************************/ add_action( 'travelify_before_loop_content', 'travelify_loop_before', 10 ); /** * Contains the opening div */ function travelify_loop_before() { echo '
'; } /****************************************************************************************/ add_action( 'travelify_loop_content', 'travelify_theloop', 10 ); /** * Shows the loop content */ function travelify_theloop() { if( is_page() ) { if( is_page_template( 'templates/template-blog-large-image.php' ) ) { travelify_theloop_for_template_blog_image_large(); } elseif( is_page_template( 'templates/template-blog-medium-image.php' ) ) { travelify_theloop_for_template_blog_image_medium(); } elseif( is_page_template( 'templates/template-blog-full-content.php' ) ) { travelify_theloop_for_template_blog_full_content(); } else { travelify_theloop_for_page(); } } elseif( is_single() ) { travelify_theloop_for_single(); } elseif( is_search() ) { travelify_theloop_for_search(); } else { travelify_theloop_for_archive(); } } /****************************************************************************************/ if ( ! function_exists( 'travelify_theloop_for_archive' ) ) : /** * Function to show the archive loop content. */ function travelify_theloop_for_archive() { global $post; if( have_posts() ) { while( have_posts() ) { the_post(); do_action( 'travelify_before_post' ); ?>
>

>

'
', 'link_before' => '', 'link_after' => '', 'pagelink' => '%', 'echo' => 1 ) ); ?>

>

'
', 'link_before' => '', 'link_after' => '', 'pagelink' => '%', 'echo' => 1 ) ); ?>

>

'post', 'paged' => $paged ) ); $temp_query = $wp_query; $wp_query = null; $wp_query = $blog_query; if( $blog_query->have_posts() ) { while( $blog_query->have_posts() ) { $blog_query->the_post(); do_action( 'travelify_before_post' ); ?>
>
max_num_pages > 1 ) { ?>

'post', 'paged' => $paged ) ); $temp_query = $wp_query; $wp_query = null; $wp_query = $blog_query; if( $blog_query->have_posts() ) { while( $blog_query->have_posts() ) { $blog_query->the_post(); do_action( 'travelify_before_post' ); ?>
>
max_num_pages > 1 ) { ?>

'post', 'paged' => $paged ) ); $temp_query = $wp_query; $wp_query = null; $wp_query = $blog_query; global $more; // Declare global $more (before the loop). if( $blog_query->have_posts() ) { while( $blog_query->have_posts() ) { $blog_query->the_post(); do_action( 'travelify_before_post' ); ?>
>

'
', 'link_before' => '', 'link_after' => '', 'pagelink' => '%', 'echo' => 1 ) ); ?>
max_num_pages > 1 ) { ?>

max_num_pages > 1 ) : ?> '; } /****************************************************************************************/ if ( ! function_exists( 'travelify_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own travelify_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. */ function travelify_comment( $comment, $args, $depth ) { $GLOBALS['comment'] = $comment; switch ( $comment->comment_type ) : case 'pingback' : case 'trackback' : // Display trackbacks differently than normal comments. ?>
  • id="comment-">

    ', '' ); ?>

  • id="li-comment-">
    %1$s %2$s', get_comment_author_link(), // If current post author is also comment author, make it known visually. ( $comment->user_id === $post->post_author ) ? ' ' . __( 'Post author', 'travelify' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'travelify' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply', 'travelify' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>