'; if( $social_icon == 'googlePlus' ){ echo ''; }else{ echo ''; } echo ''; } } } } /** * Add a pingback url auto-discovery header for singularly identifiable articles. */ function agency_lite_pingback_header() { if ( is_singular() && pings_open() ) { echo ''; } } add_action( 'wp_head', 'agency_lite_pingback_header' ); /** *to display post in custom **/ function agency_lite_post_lists(){ $agency_lite_post_list = array( 'post_type' => 'post', 'posts_per_page' => -1, ); $posts_lists = array(); $posts_lists[] = esc_html__('--Choose--','agency-lite'); $agency_lite_post = new WP_Query ($agency_lite_post_list); while( $agency_lite_post->have_posts() ): $agency_lite_post->the_post(); $posts_lists[ get_the_ID() ] = get_the_title(); endwhile; return $posts_lists; } //display page in custom function agency_lite_page_lists(){ $agency_lite_page_lists = array( 'post_type' => 'page', 'posts_per_page' => -1, ); $pages_lists = array(); $pages_lists[] = esc_html__('--Choose--','agency-lite'); $agency_lite_page = new WP_Query ($agency_lite_page_lists); while( $agency_lite_page->have_posts() ): $agency_lite_page->the_post(); $pages_lists[ get_the_ID() ] = get_the_title(); endwhile; return $pages_lists; } /** *image display function * **/ function agency_lite_slider_control(){ ?>
'0', 'exclude' => '1', ) ); $agency_lite_services_cat_array = array(); $agency_lite_services_cat_array[] = esc_html__('-- Choose --','agency-lite'); foreach($agency_lite_services_cat_lists as $agency_lite_services_cat_list){ $agency_lite_services_cat_array[$agency_lite_services_cat_list->slug] = $agency_lite_services_cat_list->name; } return $agency_lite_services_cat_array; } /** * display breadcrumbs * */ function agency_lite_header_banner_x() { if( get_header_image() ){ $overlay = '
'; }else{ $overlay = '' ; } $agency_lite_breadcrumb_image_enable = get_theme_mod('agency_lite_breadcrumb_image_enable'); if( $agency_lite_breadcrumb_image_enable == 'on' ){ ?>

', ''); } elseif(is_search()) { ?>

' . get_search_query() . '' ); ?>

'div', 'show_browse' => false, ); breadcrumb_trail( $breadcrumb_args ); ?>
array( 'href'=>array() ) ); return wp_kses($input,$all_tags); } function agency_lite_cat_title(){ $archive_title = get_the_archive_title(); $explod = (explode(":",$archive_title)); $cat_name = end($explod); ?>

is_home() ) { $query->set('category__not_in', $ex_cats); } return $query; } add_filter('pre_get_posts', 'agency_lite_exclude_category_from_blogpost'); /** * Change comment form textarea to use placeholder * * @param array $args * @return array */ function agency_lite_comment_textarea_placeholder( $args ) { $args['comment_field'] = str_replace( 'textarea', 'textarea placeholder="Your Comment"', $args['comment_field'] ); return $args; } add_filter( 'comment_form_defaults', 'agency_lite_comment_textarea_placeholder' ); /** * Comment Form Fields Placeholder * */ function agency_lite_comment_form_fields( $fields ) { foreach( $fields as &$field ) { $field = str_replace( 'id="author"', 'id="author" placeholder="Your Name*"', $field ); $field = str_replace( 'id="email"', 'id="email" placeholder="Your Email Address*"', $field ); $field = str_replace( 'id="url"', 'id="url" placeholder="Your Website Address*"', $field ); } return $fields; } add_filter( 'comment_form_default_fields', 'agency_lite_comment_form_fields' ); /* * Customizer sanitization */ function agency_lite_sanitize_textarea($input){ return wp_kses_post(force_balance_tags($input)); } /** * Move comment fields at bottom */ function agency_lite_move_comment_field_to_bottom( $fields ) { $comment_field = $fields['comment']; unset( $fields['comment'] ); $fields['comment'] = $comment_field; return $fields; } add_filter( 'comment_form_fields', 'agency_lite_move_comment_field_to_bottom' );