ID, 'ambition_sidebarlayout', true ); $frontpage_id = get_option('page_on_front'); // for front page $banner = get_post_meta( $frontpage_id, 'ambition_sidebarlayout', true ); $page_id = ( 'page' == get_option( 'show_on_front' ) ? get_option( 'page_for_posts' ) : get_the_ID() ); $home_blog = get_post_meta( $page_id, 'ambition_sidebarlayout', true ); } if( empty( $layout ) || is_archive() || is_search() || is_home() ) { $layout = 'default'; } if(is_front_page() && $banner): if( 'default' == $banner ) {//checked from the themeoptions. $themeoption_layout = $content_layout; if( 'left' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } elseif( 'left-sidebar' == $banner ) { //checked from the particular page / post. get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right-sidebar' == $banner ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } elseif(is_front_page()): if( 'default' == $layout ) {//checked from the themeoptions. $themeoption_layout = $content_layout; if( 'left' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } elseif( 'left-sidebar' == $layout ) { //checked from the particular page / post. get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right-sidebar' == $layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } elseif(is_home()): if( 'default' == $home_blog ) {//checked from the themeoptions. $themeoption_layout = $content_layout; if( 'left' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } elseif( 'left-sidebar' == $home_blog ) { //checked from the particular page / post. get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right-sidebar' == $home_blog ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } else: if( 'default' == $layout ) { //checked from the themeoptions. $themeoption_layout = $content_layout; if( 'left' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } elseif( 'left-sidebar' == $layout ) {//checked from the particular page / post. get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right-sidebar' == $layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } endif; } /****************************************************************************************/ add_action( 'ambition_before_loop_content', 'ambition_loop_before', 10 ); /** * Contains the opening div */ function ambition_loop_before() { echo '
'; } /****************************************************************************************/ add_action( 'ambition_loop_content', 'ambition_theloop', 10 ); /** * Shows the loop content */ function ambition_theloop() { if( is_page() ) { ambition_theloop_for_page(); } elseif( is_single() ) { ambition_theloop_for_single(); } elseif( is_search() ) { ambition_theloop_for_search(); } else { ambition_theloop_for_archive(); } } /****************************************************************************************/ if ( ! function_exists( 'ambition_theloop_for_archive' ) ) : /** * Fuction to show the archive loop content. */ function ambition_theloop_for_archive() { global $post; if( have_posts() ) { while( have_posts() ) { the_post(); do_action( 'ambition_before_post' ); ?>
>

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

>

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

>

max_num_pages > 1 ) : ?> '; } /****************************************************************************************/ if ( ! function_exists( 'ambition_comment' ) ) : /** * Template for comments and pingbacks. * * To override this walker in a child theme without modifying the comments template * simply create your own ambition_comment(), and that function will be used instead. * * Used as a callback by wp_list_comments() for displaying the comments. * * @since Ambition 1.0 */ function ambition_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', 'ambition' ) . '' : '' ); printf( '', esc_url( get_comment_link( $comment->comment_ID ) ), get_comment_time( 'c' ), /* translators: 1: date, 2: time */ sprintf( __( '%1$s at %2$s', 'ambition' ), get_comment_date(), get_comment_time() ) ); ?>
    comment_approved ) : ?>

    ', '

    ' ); ?>
    __( 'Reply ', 'ambition' ), 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
    ID, 'ambition_sidebarlayout', true ); } if( empty( $layout ) || is_archive() || is_search() || is_home() ) { $layout = 'default'; } if( 'default' == $layout ) { //checked from the themeoptions. $themeoption_layout = $content_layout; if( 'left' == $themeoption_layout ) { get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right' == $themeoption_layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } elseif( 'left-sidebar' == $layout ) { //checked from the particular page / post. get_template_part( 'content','leftsidebar' );//used content-leftsidebar.php } elseif( 'right-sidebar' == $layout ) { get_template_part( 'content','rightsidebar' );//used content-rightsidebar.php } else { get_template_part( 'content','nosidebar' );//used content-nosidebar.php } } /****************************************************************************************/ add_action( 'ambition_business_template_content', 'ambition_business_template_widgetized_content'); /** * Displays the widget as contents */ function ambition_business_template_widgetized_content() { ?>