diff --git a/CleanBuild/functions/acf/acf-fields-company-details.php b/CleanBuild/functions/acf/acf-fields-company-details.php index 10d3e18..f2d9673 100644 --- a/CleanBuild/functions/acf/acf-fields-company-details.php +++ b/CleanBuild/functions/acf/acf-fields-company-details.php @@ -235,6 +235,25 @@ 'layout' => 'table', 'button_label' => 'Add Phone Number', 'sub_fields' => array( + array( + 'key' => 'field_5bb611f4e6a06', + 'label' => 'Area Code', + 'name' => 'area_code', + 'type' => 'text', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array( + 'width' => '20', + 'class' => '', + 'id' => '', + ), + 'default_value' => '', + 'placeholder' => '', + 'prepend' => '', + 'append' => '', + 'maxlength' => '', + ), array( 'key' => 'field_5a5f6c316b5fe', 'label' => 'Phone Number', @@ -244,7 +263,7 @@ 'required' => 0, 'conditional_logic' => 0, 'wrapper' => array( - 'width' => '', + 'width' => '80', 'class' => '', 'id' => '', ), @@ -355,4 +374,4 @@ )); endif; -?> +?> \ No newline at end of file diff --git a/CleanBuild/functions/acf/acf-shortcodes.php b/CleanBuild/functions/acf/acf-shortcodes.php index a7a3a1b..355ba91 100644 --- a/CleanBuild/functions/acf/acf-shortcodes.php +++ b/CleanBuild/functions/acf/acf-shortcodes.php @@ -101,14 +101,19 @@ function company_phone_number_func( $atts ){ while ( have_rows('company_phone_number', 'company') ) : the_row(); $counter++; $number = get_sub_field('phone_number'); + if (get_sub_field('area_code')){ + $areacode = get_sub_field('area_code'); + } else { + $areacode = '+44'; + } $first_number = substr($number, 0, 1); if($first_number == 0) { $number_short = substr($number, 1); $number_space = str_replace(' ', '', $number_short); - $number_link = '+44' . $number_space; + $number_link = $areacode . $number_space; } else { $number_space = str_replace(' ', '', $number); - $number_link = '+44' . $number_space; + $number_link = $areacode . $number_space; } if($row == $counter) { diff --git a/CleanBuild/functions/wordpress/wordpress-custom.php b/CleanBuild/functions/wordpress/wordpress-custom.php index 9dcc040..b652bfb 100644 --- a/CleanBuild/functions/wordpress/wordpress-custom.php +++ b/CleanBuild/functions/wordpress/wordpress-custom.php @@ -62,6 +62,21 @@ function post_link_attributes($output) { // CUSTOM IMAGE SIZES add_image_size( 'small-on-page', 150, 60 ); +//REMOVE THE APPENDED WORDS IN FRONT OF CAT, TAG & AUTHOR TITLES +function remove_static_title( $title ) { + if ( is_category() ) { + $title = single_cat_title( '', false ); + } elseif ( is_tag() ) { + $title = single_tag_title( '', false ); + } elseif ( is_archive() ) { + $title = single_tag_title( '', false ); + } elseif ( is_author() ) { + $title = '' . get_the_author() . '' ; + } + return $title; +} +add_filter( 'get_the_archive_title', 'remove_static_title' ); + // MOVE YOAST META BOX TO THE BOTTOM function yoasttobottom() { diff --git a/CleanBuild/inc/footer/backstretch-script.php b/CleanBuild/inc/footer/backstretch-script.php index 14d6f80..64d9f01 100644 --- a/CleanBuild/inc/footer/backstretch-script.php +++ b/CleanBuild/inc/footer/backstretch-script.php @@ -1,4 +1,26 @@