esc_html__( 'Right Sidebar', 'fitclub' ), 'id' => 'fitclub_right_sidebar', 'description' => esc_html__( 'Show widgets at Right side', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Left Sidebar', 'fitclub' ), 'id' => 'fitclub_left_sidebar', 'description' => esc_html__( 'Show widgets at Left side', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( '404 Page Sidebar', 'fitclub' ), 'id' => 'fitclub_error_404_page_sidebar', 'description' => esc_html__( 'Show widgets at 404 Error Page', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => esc_html__( 'Front Page Sidebar', 'fitclub' ), 'id' => 'fitclub_frontpage_section', 'description' => esc_html__( 'Show widgets at Front Page Content Section', 'fitclub'), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); $footer_sidebar_count = get_theme_mod('fitclub_footer_widgets', '4'); register_sidebar( array( 'name' => esc_html__( 'Footer Sidebar 1', 'fitclub' ), 'id' => 'fitclub_footer_sidebar1', 'description' => esc_html__( 'Show widgets at Footer section', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); if ( $footer_sidebar_count >= 2 ) { register_sidebar( array( 'name' => esc_html__( 'Footer Sidebar 2', 'fitclub' ), 'id' => 'fitclub_footer_sidebar2', 'description' => esc_html__( 'Show widgets at Footer section', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ( $footer_sidebar_count >= 3 ) { register_sidebar( array( 'name' => esc_html__( 'Footer Sidebar 3', 'fitclub' ), 'id' => 'fitclub_footer_sidebar3', 'description' => esc_html__( 'Show widgets at Footer section', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } if ($footer_sidebar_count >= 4 ) { register_sidebar( array( 'name' => esc_html__( 'Footer Sidebar 4', 'fitclub' ), 'id' => 'fitclub_footer_sidebar4', 'description' => esc_html__( 'Show widgets at Footer section', 'fitclub' ), 'before_widget' => '', 'before_title' => '

', 'after_title' => '

', ) ); } // Widgets Registration register_widget( "fitclub_service_widget" ); register_widget( "fitclub_about_us_widget" ); register_widget( "fitclub_call_to_action_widget" ); register_widget( "fitclub_testimonial_widget" ); register_widget( "fitclub_team_widget" ); register_widget( "fitclub_featured_posts_widget" ); } // Service Widget class fitclub_service_widget extends WP_Widget { function __construct() { $widget_ops = array( 'classname' => 'widget_service_block', 'description' => esc_html__( 'Display some pages as services.', 'fitclub' ) ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false, $name = esc_html__( 'TG: Service Widget', 'fitclub' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults['title'] = ''; $defaults['number'] = '3'; $instance = wp_parse_args( (array) $instance, $defaults ); $title = $instance['title']; $number = $instance[ 'number' ]; ?>

ID; $template_name = get_post_meta( $page_id, '_wp_page_template', true ); if( $template_name == 'page-templates/template-service.php' ) { array_push( $page_array, $page_id ); } } $get_service_pages = new WP_Query( array( 'posts_per_page' => $number, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => 'date' ) ); echo $before_widget; ?>
'. esc_html($title) .''. $after_title; ?>
have_posts() ):$get_service_pages->the_post(); if ( $count % 3 == 0 && $count > 1 ) { ?>
ID, 'fitclub-featured-image' ); ?>
'widget_about_block', 'description' => esc_html__( 'Show your about page.', 'fitclub' ) ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false, $name = esc_html__( 'TG: About Widget', 'fitclub' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults[ 'background_color' ] = '#575757'; $defaults[ 'background_image' ] = ''; $defaults[ 'title' ] = ''; $defaults[ 'page_id' ] = ''; $defaults[ 'button_text' ] = ''; $defaults[ 'button_url' ] = ''; $defaults[ 'button_icon' ] = ''; $instance = wp_parse_args( (array) $instance, $defaults ); $title = $instance[ 'title' ]; $background_color = $instance[ 'background_color' ]; $background_image = $instance[ 'background_image' ]; $page_id = $instance[ 'page_id' ]; $button_text = $instance[ 'button_text' ]; $button_url = $instance[ 'button_url' ]; $button_icon = $instance[ 'button_icon' ]; ?>




' ', 'name' => $this->get_field_name( 'page_id' ), 'selected' => absint($page_id) ) ); ?>

Refer here For Icon Class', 'fitclub' ), array( 'a' => array( 'href' => array() ) ) ), esc_url( $url ) ); echo $link; ?>

have_posts() ):$the_query->the_post(); $title_attribute = the_title_attribute( 'echo=0' ); $output = '

' . esc_html ( get_the_title() ). '

'; $output .= '
' . get_the_content('', true) . '
'; $output .= '
'; $output .= '' . esc_html__( 'Read more', 'fitclub' ) . ''; if ( !empty ( $button_text ) ) { $output .= '' .esc_html($button_text). ' '; } $output .= '
'; echo $output; ?>
'widget_call_to_action_block', 'description' => esc_html__( 'Use this widget to show the call to action section.', 'fitclub' ) ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false, $name = esc_html__( 'TG: Call To Action Widget', 'fitclub' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults[ 'background_color' ] = '#32c4d1'; $defaults[ 'background_image' ] = ''; $defaults[ 'text' ] = ''; $defaults[ 'button_text' ] = ''; $defaults[ 'button_url' ] = ''; $instance = wp_parse_args( (array) $instance, $defaults ); $background_color = $instance[ 'background_color' ]; $background_image = $instance[ 'background_image' ]; $text = $instance[ 'text' ]; $button_text = $instance[ 'button_text' ]; $button_url = $instance[ 'button_url' ]; ?>





'widget_testimonial_block', 'description' => esc_html__( 'Display some pages as testimonial.', 'fitclub' ) ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false, $name = esc_html__( 'TG: Testimonial Widget', 'fitclub' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults[ 'background_color' ] = '#575757'; $defaults[ 'background_image' ] = ''; $defaults['title'] = ''; $defaults['number'] = 3; $instance = wp_parse_args( (array) $instance, $defaults ); $background_color = $instance[ 'background_color' ]; $background_image = $instance[ 'background_image' ]; $title = $instance['title']; $number = $instance[ 'number' ]; ?>




ID; $template_name = get_post_meta( $page_id, '_wp_page_template', true ); if( $template_name == 'page-templates/template-testimonial.php' ) { array_push( $page_array, $page_id ); } } $get_testimonial_pages = new WP_Query( array( 'posts_per_page' => $number, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => 'date' ) ); $bg_style = ''; $bg_class = 'image-background'; if ( !empty( $background_image ) ) { $bg_style = 'background-image:url(' . esc_url($background_image) . ');scroll no-repeat center top/cover;'; } else { $bg_style = 'background-color:' . esc_attr($background_color) . ';'; $bg_class = 'no-image'; } echo $before_widget; ?>
'.esc_html($title).''. $after_title; ?>
    have_posts() ):$get_testimonial_pages->the_post(); ?>
  • ID, 'fitclub-testimonial' ); ?>
'widget_team_block', 'description' => esc_html__( 'Show your Team Members.', 'fitclub' ) ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false, $name = esc_html__( 'TG: Our Team Widget', 'fitclub' ), $widget_ops, $control_ops); } function form( $instance ) { $defaults['title'] = ''; $defaults['number'] = 3; $instance = wp_parse_args( (array) $instance, $defaults ); $title = $instance[ 'title' ]; $number = $instance[ 'number' ]; ?>

ID; $template_name = get_post_meta( $page_id, '_wp_page_template', true ); if( $template_name == 'page-templates/template-team.php' ) { array_push( $page_array, $page_id ); } } $get_featured_pages = new WP_Query( array( 'posts_per_page' => $number, 'post_type' => array( 'page' ), 'post__in' => $page_array, 'orderby' => 'date' ) ); echo $before_widget; ?>
'. esc_html($title) .''. $after_title; ?> have_posts() ):$get_featured_pages->the_post(); $title_attribute = the_title_attribute( 'echo=0' ); ?>
'; } ?>

ID, 'fitclub_designation', true ); if( !empty( $fitclub_designation ) ) { $fitclub_designation = isset( $fitclub_designation ) ? esc_attr( $fitclub_designation ) : ''; } echo esc_html ( $fitclub_designation ); ?>
'widget_featured_posts_block', 'description' => esc_html__( 'Display latest posts or posts of specific category', 'fitclub') ); $control_ops = array( 'width' => 200, 'height' => 250 ); parent::__construct( false,$name= esc_html__( 'TG: Featured Posts', 'fitclub' ),$widget_ops); } function form( $instance ) { $defaults[ 'title' ] = ''; $defaults[ 'number' ] = 3; $defaults[ 'type' ] = 'latest'; $defaults[ 'category' ] = ''; $instance = wp_parse_args( (array) $instance, $defaults ); $title = $instance[ 'title' ]; $number = $instance[ 'number' ]; $type = $instance[ 'type' ]; $category = $instance[ 'category' ]; ?>

id="get_field_id( 'type' ); ?>" name="get_field_name( 'type' ); ?>" value="latest"/>
id="get_field_id( 'type' ); ?>" name="get_field_name( 'type' ); ?>" value="category"/>

' ','name' => $this->get_field_name( 'category' ), 'selected' => absint($category) ) ); ?>

$number, 'post_type' => 'post', 'ignore_sticky_posts' => true ) ); } else { $get_featured_posts = new WP_Query( array( 'posts_per_page' => $number, 'post_type' => 'post', 'category__in' => $category ) ); } echo $before_widget; ?>
'. esc_html($title) .''. $after_title; } ?>
    have_posts() ):$get_featured_posts->the_post(); ?>
  • %2$s'; $time_string = printf( $time_string, esc_attr( get_the_date( 'c' ) ), esc_html( get_the_date( 'M j' ) ) ); ?>
    <?php esc_attr_e(' />