Changeset 1756170
- Timestamp:
- 10/31/2017 04:38:13 PM (8 years ago)
- Location:
- socius-marketing-page-taxonomy/trunk
- Files:
-
- 4 added
- 8 edited
-
css/fonts/worldface.eot (added)
-
css/fonts/worldface.svg (added)
-
css/fonts/worldface.ttf (added)
-
css/fonts/worldface.woff (added)
-
css/styles.css (modified) (3 diffs)
-
css/styles.min.css (modified) (1 diff)
-
inc/archive-pages.php (modified) (2 diffs)
-
inc/options-page.php (modified) (3 diffs)
-
inc/stateface.php (modified) (1 diff)
-
inc/template-archive.php (modified) (6 diffs)
-
readme.txt (modified) (3 diffs)
-
socius-marketing-page-taxonomy.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
socius-marketing-page-taxonomy/trunk/css/styles.css
r1586638 r1756170 1 @font-face { 2 font-family: 'worldface'; 3 src: url('fonts/worldface.eot?cvdz4z'); 4 src: url('fonts/worldface.eot?cvdz4z#iefix') format('embedded-opentype'), 5 url('fonts/worldface.ttf?cvdz4z') format('truetype'), 6 url('fonts/worldface.woff?cvdz4z') format('woff'), 7 url('fonts/worldface.svg?cvdz4z#worldface') format('svg'); 8 font-weight: normal; 9 font-style: normal; 10 } 11 .worldface { 12 display: block; 13 text-align: center; 14 font-family: 'worldface'; 15 font-size: 150px; 16 line-height: 1; 17 text-transform: none !important; 18 } 19 .icon-globe:before { 20 content: "\e90a"; 21 } 22 .icon-asia:before { 23 content: "\e908"; 24 } 25 .icon-africa:before { 26 content: "\e909"; 27 } 28 .icon-australia:before { 29 content: "\e907"; 30 } 31 .icon-caribbean:before { 32 content: "\e903"; 33 } 34 .icon-canada:before { 35 content: "\e906"; 36 } 37 .icon-central-america:before { 38 content: "\e904"; 39 } 40 .icon-europe:before { 41 content: "\e901"; 42 } 43 .icon-mexico:before { 44 content: "\e905"; 45 } 46 .icon-middle-east:before { 47 content: "\e900"; 48 } 49 .icon-south-america:before { 50 content: "\e902"; 51 } 1 52 @font-face { 2 53 font-family: 'stateface'; … … 57 108 } 58 109 .smct-category img, 59 # content .smct-category img {110 #smct_content .smct-category img { 60 111 margin:0 auto 5px; 61 112 display: block; … … 93 144 } 94 145 .smct-image img, 95 # content .smct-image img {146 #smct_content .smct-image img { 96 147 display:block; 97 148 margin:0 auto; -
socius-marketing-page-taxonomy/trunk/css/styles.min.css
r1699048 r1756170 1 @font-face{font-family:'stateface';src:url('fonts/stateface-regular-webfont.eot');src:url('fonts/stateface-regular-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/stateface-regular-webfont.woff') format('woff'), url('fonts/stateface-regular-webfont.ttf') format('truetype'), url('fonts/stateface-regular-webfont.svg#statefaceregular') format('svg');font-weight:normal;font-style:normal}.smct-state{text-align:center}.stateface{display:block;text-align:center;font-family:'stateface';font-size:150px;line-height:1;text-transform:none !important}.stateface.cities{font-size:200px}.smct-state a,.smct-state a:hover,.smct-state a:active,.smct-state a:focus{text-decoration:none !important;text-transform:capitalize}#smct-cities-listing a{text-transform:capitalize}#smct-cities-listing ul{list-style-type:none;padding-left:0}.smct-archive-title{margin-top:0}.smct-archive-title a{text-transform:capitalize}.smct-page-title{text-transform:capitalize}.smct-category{text-align:center;margin-bottom:20px}.smct-category img,#content .smct-category img{margin:0 auto 5px;display:block;width:100% \9;max-width:100%;height:auto}.smct-category h3{margin:0 auto}.smct-category a{text-decoration:none;text-transform:capitalize}.smct-archive-summary{margin-bottom:20px}.smct-image-wrap{display:block;background-repeat:no-repeat;background-position:center center;background-size:cover;width:100%;padding-bottom:60%;margin-bottom:10px;opacity:1;transition:all .25s ease-in-out;-moz-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out}.smct-category a:hover .smct-image-wrap,.smct-archive-summary a:hover .smct-image-wrap{opacity:0.75}.smct-image img,#content .smct-image img{display:block;margin:0 auto;width:100% \9;max-width:100%;height:auto}#smct-nav-above{margin-bottom:10px}.smct-row{margin-right:-15px;margin-left:-15px}.smct-row:before,.smct-row:after{display:table;content:''}.smct-row:after{clear:both}:before,:after{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.smct-col-sm-3,.smct-col-sm-4,.smct-col-sm-6,.smct-col-sm-8,.smct-col-md-3,.smct-col-md-4,.smct-col-md-9{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.smct-col-xs-12{width:100%}@media (min-width: 768px){.smct-col-sm-3,.smct-col-sm-4,.smct-col-sm-6,.smct-col-sm-8,.smct-col-md-3,.smct-col-md-4,.smct-col-md-9{float:left}.smct-col-sm-3{width:25%}.smct-col-sm-4{width:33.33333333%}.smct-col-sm-6{width:50%}.smct-col-sm-8{width:66.66666667%}.smct-category{display:inline-block;float:none !important;vertical-align:top}}@media (min-width:992px){.smct-col-md-3{width:25%}.smct-col-md-4{width:33.33333333%}.smct-col-md-9{width:75%}}1 .stateface,.worldface{font-size:150px;line-height:1;text-transform:none!important;text-align:center;display:block}.smct-category,.smct-state,.stateface,.worldface{text-align:center}@font-face{font-family:worldface;src:url(fonts/worldface.eot?cvdz4z);src:url(fonts/worldface.eot?cvdz4z#iefix) format('embedded-opentype'),url(fonts/worldface.ttf?cvdz4z) format('truetype'),url(fonts/worldface.woff?cvdz4z) format('woff'),url(fonts/worldface.svg?cvdz4z#worldface) format('svg');font-weight:400;font-style:normal}.worldface{font-family:worldface}.icon-globe:before{content:"\e90a"}.icon-asia:before{content:"\e908"}.icon-africa:before{content:"\e909"}.icon-australia:before{content:"\e907"}.icon-caribbean:before{content:"\e903"}.icon-canada:before{content:"\e906"}.icon-central-america:before{content:"\e904"}.icon-europe:before{content:"\e901"}.icon-mexico:before{content:"\e905"}.icon-middle-east:before{content:"\e900"}.icon-south-america:before{content:"\e902"}@font-face{font-family:stateface;src:url(fonts/stateface-regular-webfont.eot);src:url(fonts/stateface-regular-webfont.eot?#iefix) format('embedded-opentype'),url(fonts/stateface-regular-webfont.woff) format('woff'),url(fonts/stateface-regular-webfont.ttf) format('truetype'),url(fonts/stateface-regular-webfont.svg#statefaceregular) format('svg');font-weight:400;font-style:normal}.stateface{font-family:stateface}#smct-cities-listing a,.smct-archive-title a,.smct-category a,.smct-page-title{text-transform:capitalize}.stateface.cities{font-size:200px}.smct-state a,.smct-state a:active,.smct-state a:focus,.smct-state a:hover{text-decoration:none!important;text-transform:capitalize}#smct-cities-listing ul{list-style-type:none;padding-left:0}.smct-archive-title{margin-top:0}.smct-category{margin-bottom:20px}#smct_content .smct-category img,.smct-category img{margin:0 auto 5px;display:block;width:100%\9;max-width:100%;height:auto}.smct-category h3{margin:0 auto}.smct-category a{text-decoration:none}.smct-archive-summary{margin-bottom:20px}.smct-image-wrap{display:block;background-repeat:no-repeat;background-position:center center;background-size:cover;width:100%;padding-bottom:60%;margin-bottom:10px;opacity:1;transition:all .25s ease-in-out;-moz-transition:all .25s ease-in-out;-webkit-transition:all .25s ease-in-out}.smct-archive-summary a:hover .smct-image-wrap,.smct-category a:hover .smct-image-wrap{opacity:.75}#smct_content .smct-image img,.smct-image img{display:block;margin:0 auto;width:100%\9;max-width:100%;height:auto}#smct-nav-above{margin-bottom:10px}.smct-row{margin-right:-15px;margin-left:-15px}.smct-row:after,.smct-row:before{display:table;content:''}.smct-row:after{clear:both}:after,:before{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.smct-col-md-3,.smct-col-md-4,.smct-col-md-9,.smct-col-sm-3,.smct-col-sm-4,.smct-col-sm-6,.smct-col-sm-8{position:relative;min-height:1px;padding-right:15px;padding-left:15px}.smct-col-xs-12{width:100%}@media (min-width:768px){.smct-col-md-3,.smct-col-md-4,.smct-col-md-9,.smct-col-sm-3,.smct-col-sm-4,.smct-col-sm-6,.smct-col-sm-8{float:left}.smct-col-sm-3{width:25%}.smct-col-sm-4{width:33.33333333%}.smct-col-sm-6{width:50%}.smct-col-sm-8{width:66.66666667%}.smct-category{display:inline-block;float:none!important;vertical-align:top}}@media (min-width:992px){.smct-col-md-3{width:25%}.smct-col-md-4{width:33.33333333%}.smct-col-md-9{width:75%}} -
socius-marketing-page-taxonomy/trunk/inc/archive-pages.php
r1699048 r1756170 122 122 if(get_the_ID() == get_option( 'smct_area_page_id' )) { 123 123 124 $terms = get_terms( 'smct_areas', array( 125 'orderby' => 'name', 126 'parent' => 0 127 ) ); 128 129 if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { 130 $content = '<div id="smct-area-archive">'; 131 132 $title_option = get_option('smct_display_page_titles'); 133 if( $title_option[0] !== 'no') { 134 $content .= '<h1>Areas Served</h1>'; 135 } 136 $content .= '<div class="smct-row">'; 137 foreach ( $terms as $term ) { 138 139 $area_page_args = array( 140 141 'post_type' => 'page', 142 'order' => 'DESC', 143 'child_of' => get_the_ID(), 144 'taxonomy' => 'smct_areas', 145 'term' => $term->slug 146 ); 147 148 /* Removed in 1.0.10 as possibly not necessary 149 $the_query = new WP_Query($area_page_args); 150 $i = 0; 151 if( $the_query->have_posts() ) { 152 while ($the_query->have_posts() ) { 153 $the_query->the_post(); 154 if( smct_grab_first_image() ) { 155 if($i < 1 ) { 156 $first_image = smct_grab_first_image(); 157 $i++; 158 } 159 } 160 } 161 } 162 wp_reset_postdata(); 163 */ 164 $smct_number_of_columns = get_option('smct_number_of_columns'); 165 if($smct_number_of_columns[0] == '3wide') { 166 $width = 'smct-col-md-4 smct-col-sm-6 smct-col-xs-12'; 167 } else { 168 $width = 'smct-col-md-3 smct-col-sm-6 smct-col-xs-12'; 169 } 170 $content .= '<div id="smct-' . $term->slug . '" class="' . $width . ' smct-state">'; 171 $content .= '<h3><a href="' . esc_url( get_term_link( $term ) ) . '"><span class="stateface">' . smct_determine_stateface($term->name) . '</span> ' . $term->name . '</h3></a>'; 172 $content .= '</div>'; 124 $terms = get_terms( 'smct_areas', array( 125 'orderby' => 'name', 126 'parent' => 0 127 ) ); 128 129 if ( ! empty( $terms ) && ! is_wp_error( $terms ) ) { 130 $content = '<div id="smct-area-archive">'; 131 132 $title_option = get_option('smct_display_page_titles'); 133 if( $title_option[0] !== 'no') { 134 $content .= '<h1>Areas Served</h1>'; 135 } 136 137 $smct_number_of_columns = get_option('smct_number_of_columns'); 138 if($smct_number_of_columns[0] == '3wide') { 139 $width = 'smct-col-md-4 smct-col-sm-6 smct-col-xs-12'; 140 } else { 141 $width = 'smct-col-md-3 smct-col-sm-6 smct-col-xs-12'; 173 142 } 174 $content .= '</div><!-- end .row -->'; 175 $content .= '</div><!-- end #smct-area-archive -->'; 176 } else { 177 $content = '<div id="post-0" class="post error404 not-found">'; 178 $content .= '<h1 class="entry-title">No Entries</h1>'; 179 $content .= '<div class="entry-content">'; 180 $content .= '<p>Apologies, but no results were found for the requested archive.</p>'; 181 $content .= '</div><!-- .entry-content -->'; 182 $content .= '</div><!-- #post-0 -->'; 183 } 143 144 $usa_count = 0; 145 foreach ( $terms as &$term ) { 146 $international_locations = array('africa','asia','australia','canada','caribbean','central-america','europe','mexico','middle-east','south-america','united-states'); 147 if(in_array($term->slug, $international_locations) ) { 148 $term->international = 1; 149 $top .= '<div id="smct-' . $term->slug . '" class="' . $width . ' smct-state">'; 150 $top .= '<h3><a href="' . esc_url( get_term_link( $term ) ) . '">' . smct_determine_stateface($term->slug) . $term->name . '</h3></a>'; 151 $top .= '</div>'; 152 } else { 153 $term->international = 0; 154 $bottom .= '<div id="smct-' . $term->slug . '" class="' . $width . ' smct-state">'; 155 $bottom .= '<h3><a href="' . esc_url( get_term_link( $term ) ) . '">' . smct_determine_stateface($term->slug) . $term->name . '</h3></a>'; 156 $bottom .= '</div>'; 157 } 158 if($term->slug == 'united-states') { $usa_count = $term->count; } 159 } 160 161 if(!empty($top)) { 162 $content .= '<h3>International</h3>'; 163 $content .= '<div class="smct-row">'; 164 $content .= $top; 165 $content .= '</div>'; 166 } 167 if(!empty($top) && $usa_count < 1) { 168 $content .= '<h3>United States</h3>'; 169 } 170 if($usa_count < 1) { 171 $content .= '<div class="smct-row">'; 172 $content .= $bottom; 173 $content .= '</div>'; 174 } 175 176 $content .= '</div><!-- end #smct-area-archive -->'; 177 178 } else { 179 $content = '<div id="post-0" class="post error404 not-found">'; 180 $content .= '<h1 class="entry-title">No Entries</h1>'; 181 $content .= '<div class="entry-content">'; 182 $content .= '<p>Apologies, but no results were found for the requested archive.</p>'; 183 $content .= '</div><!-- .entry-content -->'; 184 $content .= '</div><!-- #post-0 -->'; 185 } 184 186 185 187 } 188 186 189 return $content; 187 190 … … 189 192 190 193 add_filter('the_content', 'smct_area_content'); 191 192 194 193 195 -
socius-marketing-page-taxonomy/trunk/inc/options-page.php
r1699048 r1756170 39 39 add_settings_section( 'smct_section_two', 'Display Options', array( $this, 'section_callback' ), 'smct-options' ); 40 40 add_settings_section( 'smct_section_three', 'Theme Overrides', array( $this, 'section_callback' ), 'smct-options' ); 41 add_settings_section( 'smct_section_four', 'Advanced Custom Fields', array( $this, 'section_callback' ), 'smct-options' );41 //add_settings_section( 'smct_section_four', 'Advanced Custom Fields', array( $this, 'section_callback' ), 'smct-options' ); 42 42 } 43 43 public function section_callback( $arguments ) { … … 51 51 case 'smct_section_three': 52 52 break; 53 case 'smct_section_four':54 echo '<p>If you are using an ACF custom field to alter the displayed page title, enter its field name here.</p>';55 break;53 //case 'smct_section_four': 54 //echo '<p>If you are using an ACF custom field to alter the displayed page title, enter its field name here.</p>'; 55 //break; 56 56 } 57 57 } … … 139 139 'default' => '', 140 140 ), 141 array(142 'uid' => 'smct_alternate_page_title',143 'label' => 'Alternate Page Title Field Name',144 'section' => 'smct_section_four',145 'type' => 'text',146 'placeholder' => '',147 'default' => '',148 ),141 // array( 142 // 'uid' => 'smct_alternate_page_title', 143 // 'label' => 'Alternate Page Title Field Name', 144 // 'section' => 'smct_section_four', 145 // 'type' => 'text', 146 // 'placeholder' => '', 147 // 'default' => '', 148 // ), 149 149 ); 150 150 foreach( $fields as $field ){ -
socius-marketing-page-taxonomy/trunk/inc/stateface.php
r1585361 r1756170 1 1 <?php 2 function smct_determine_stateface($taxonomyName ) {2 function smct_determine_stateface($taxonomyName,$optional_class = null) { 3 3 4 switch (ucfirst($taxonomyName)) 4 $font_class = 'stateface'; 5 6 switch ($taxonomyName) 5 7 { 6 case ' Alabama':8 case 'alabama': 7 9 $stateface = 'B'; break; 8 case ' Alaska':10 case 'alaska': 9 11 $stateface = 'A'; break; 10 case ' Arizona':12 case 'arizona': 11 13 $stateface = 'D'; break; 12 case ' Arkansas':14 case 'arkansas': 13 15 $stateface = 'C'; break; 14 case ' California':16 case 'california': 15 17 $stateface = 'E'; break; 16 case ' Colorado':18 case 'colorado': 17 19 $stateface = 'F'; break; 18 case ' Connecticut':20 case 'connecticut': 19 21 $stateface = 'G'; break; 20 case ' Delaware':22 case 'delaware': 21 23 $stateface = 'H'; break; 22 case ' Florida':24 case 'florida': 23 25 $stateface = 'I'; break; 24 case ' Georgia':26 case 'georgia': 25 27 $stateface = 'J'; break; 26 case ' Hawaii':28 case 'hawaii': 27 29 $stateface = 'K'; break; 28 case ' Idaho':30 case 'idaho': 29 31 $stateface = 'M'; break; 30 case ' Illinois':32 case 'illinois': 31 33 $stateface = 'N'; break; 32 case ' Indiana':34 case 'indiana': 33 35 $stateface = 'O'; break; 34 case ' Iowa':36 case 'iowa': 35 37 $stateface = 'L'; break; 36 case ' Kansas':38 case 'kansas': 37 39 $stateface = 'P'; break; 38 case ' Kentucky':40 case 'kentucky': 39 41 $stateface = 'Q'; break; 40 case ' Louisiana':42 case 'louisiana': 41 43 $stateface = 'R'; break; 42 case ' Maine':44 case 'maine': 43 45 $stateface = 'U'; break; 44 case ' Maryland':46 case 'maryland': 45 47 $stateface = 'T'; break; 46 case ' Massachusetts':48 case 'massachusetts': 47 49 $stateface = 'S'; break; 48 case ' Michigan':50 case 'michigan': 49 51 $stateface = 'V'; break; 50 case ' Minnesota':52 case 'minnesota': 51 53 $stateface = 'W'; break; 52 case ' Mississippi':54 case 'mississippi': 53 55 $stateface = 'Y'; break; 54 case ' Missouri':56 case 'missouri': 55 57 $stateface = 'X'; break; 56 case ' Montana':58 case 'montana': 57 59 $stateface = 'Z'; break; 58 case ' Nebraska':60 case 'nebraska': 59 61 $stateface = 'c'; break; 60 case ' Nevada':62 case 'nevada': 61 63 $stateface = 'g'; break; 62 case ' New Hampshire':64 case 'new-hampshire': 63 65 $stateface = 'd'; break; 64 case ' New Jersey':66 case 'new-jersey': 65 67 $stateface = 'e'; break; 66 case ' New Mexico':68 case 'new-mexico': 67 69 $stateface = 'f'; break; 68 case ' New York':70 case 'new-york': 69 71 $stateface = 'h'; break; 70 case ' North Carolina':72 case 'north-carolina': 71 73 $stateface = 'a'; break; 72 case ' North Dakota':74 case 'north-dakota': 73 75 $stateface = 'b'; break; 74 case ' Ohio':76 case 'ohio': 75 77 $stateface = 'i'; break; 76 case ' Oklahoma':78 case 'oklahoma': 77 79 $stateface = 'j'; break; 78 case ' Oregon':80 case 'oregon': 79 81 $stateface = 'k'; break; 80 case ' Pennsylvania':82 case 'pennsylvania': 81 83 $stateface = 'l'; break; 82 case ' Rhode Island':84 case 'rhode-island': 83 85 $stateface = 'm'; break; 84 case ' South Carolina':86 case 'south-carolina': 85 87 $stateface = 'n'; break; 86 case ' South Dakota':88 case 'south-dakota': 87 89 $stateface = 'o'; break; 88 case ' Tennessee':90 case 'tennessee': 89 91 $stateface = 'p'; break; 90 case ' Texas':92 case 'texas': 91 93 $stateface = 'q'; break; 92 case ' Utah':94 case 'utah': 93 95 $stateface = 'r'; break; 94 case ' Vermont':96 case 'vermont': 95 97 $stateface = 't'; break; 96 case ' Virginia':98 case 'virginia': 97 99 $stateface = 's'; break; 98 case ' Washington':100 case 'washington': 99 101 $stateface = 'u'; break; 100 case ' Washington, DC':102 case 'washington-dc': 101 103 $stateface = 'y'; break; 102 case ' West Virginia':104 case 'west-virginia': 103 105 $stateface = 'w'; break; 104 case ' Wisconsin':106 case 'wisconsin': 105 107 $stateface = 'v'; break; 106 case ' Wyoming':108 case 'wyoming': 107 109 $stateface = 'x'; break; 110 case 'united-states': 111 $stateface = 'z'; break; 112 default : 113 $stateface = ''; 108 114 } 109 115 116 $internationl_locations = array('africa','asia','australia','caribbean','canada','central-america','europe','mexico','middle-east','south-america'); 110 117 if($stateface == '') { 111 $stateface = 'z'; 118 $stateface = ''; 119 $font_class = 'worldface icon-'.$taxonomyName; 112 120 } 113 121 114 return $stateface; 122 if(is_archive() && is_taxonomy( 'smct_areas' ) ) { 123 $optional_class = ' cities'; 124 } 125 126 $stateface_wrap = '<span class="' . $font_class . $optional_class . '">' . $stateface . '</span>'; 127 128 return $stateface_wrap; 115 129 } -
socius-marketing-page-taxonomy/trunk/inc/template-archive.php
r1747486 r1756170 9 9 ?> 10 10 <div id="container" class="<?php echo $smct_container_width; ?>"> 11 <div id=" content" role="main">11 <div id="smct_content" role="main"> 12 12 13 13 <?php … … 30 30 $page_parent_id = end($page_parent_ids); 31 31 $page_parent_name = get_term($page_parent_id, $taxonomy ); 32 $page_parent_middle = get_term_by('id', $current_page->parent, $taxonomy); 33 $slug_for_location_icon = $current_page->slug; 34 if(!empty($page_parent_middle) && $page_parent_middle->slug !== 'united-states') { 35 $slug_for_location_icon = $page_parent_middle->slug; 36 } 32 37 ?> 33 38 34 <h1 class="smct-page-title"> 39 <h1 class="smct-page-title"> 35 40 <?php if ( is_tax('smct_cats') ) { 36 41 $category = get_the_terms($post->ID,'smct_cats'); … … 40 45 echo $current_page->name . ' Areas Served'; 41 46 } else { 42 echo $current_page->name . ', ' . $page_parent_name->name; 47 if(empty($page_parent_name->name)) { 48 echo $current_page->name; 49 } elseif(!empty($page_parent_middle->name)) { 50 echo $current_page->name . ', ' . $page_parent_middle->name; 51 } else { 52 echo $current_page->name . ', ' . $page_parent_name->name; 53 } 43 54 } 44 55 } else { … … 83 94 84 95 <?php if(is_tax('smct_areas')) {//If is Area Page 85 86 96 if (array_key_exists($term_id, $hierarchy)) {// If is State Page 87 97 … … 90 100 echo '<div id="smct-cities-listing">'; 91 101 echo '<div class="smct-row">'; 92 echo '<div class="smct-col-sm-4 smct-col-xs-12"><p> <span class="stateface cities">' . smct_determine_stateface($current_page->name) . '</span></p></div>';102 echo '<div class="smct-col-sm-4 smct-col-xs-12"><p>' . smct_determine_stateface($slug_for_location_icon) . '</p></div>'; 93 103 echo '<div class="smct-col-sm-8 smct-col-xs-12">'; 94 104 echo '<ul>'; 95 $cities_array = array(); 105 $cities_array = array(); 96 106 foreach ( $termchildren as $child ) { 97 107 $term = get_term_by( 'id', $child, $taxonomy ); 98 $cities_array[] = $term->name; 99 } 108 $parents = count(get_ancestors( $child, $taxonomy )); 109 $items = array( 110 'name' => $term->name, 111 'parents' => $parents 112 ); 113 //$cities_array[] = $term->name; 114 $cities_array[] = $items; 115 } 100 116 sort($cities_array); 117 118 if( count($page_parent_ids) > 0 ) { 119 foreach ($cities_array as $city) { //Areas with at least one parent 120 if($city['parents'] > 1 ) { 121 echo '<li class="col-sm-6"><a href="' . get_term_link( $city['name'], $taxonomy ) . '">' . $city['name'] . '</a></li>'; 122 } 123 } 124 } else { 101 125 foreach ($cities_array as $city) { 102 echo '<li class="col-sm-6"><a href="' . get_term_link( $city, $taxonomy ) . '">' . $city . '</a></li>'; 126 if($city['parents'] == 1 ) { //Don't show parented items from previous page 127 echo '<li class="col-sm-6"><a href="' . get_term_link( $city['name'], $taxonomy ) . '">' . $city['name'] . '</a></li>'; 128 } 103 129 } 130 } 104 131 echo '</ul>'; 105 132 echo '</div>'; … … 107 134 echo '</div>'; 108 135 109 } 136 } 110 137 } ?> 111 138 -
socius-marketing-page-taxonomy/trunk/readme.txt
r1747486 r1756170 4 4 Requires at least: 3.0.1 5 5 Tested up to: 4.8 6 Stable tag: 1. 0.136 Stable tag: 1.1.0 7 7 License: GPLv2 or later 8 8 License URI: http://www.gnu.org/licenses/gpl-2.0.html … … 48 48 A. The image is pulled from the page content. The Category cover image is the content image from the first page within that Category. 49 49 50 = Q. Wh y does the Areas Served page show the USA for an icon? =51 A. The icons will only match to state names. If you've made a parent category that is not a state, it will fallback to the USA icon.50 = Q. What icons are available for international locations? = 51 A. Custom icons have been added for Africa, Asia, Australia, Caribbean, Canada, Central America, Europe, Mexico, Middle East, and South America. Just like with states, international locations must have a country and continent selected in order for it to appear properly on all archive pages. You may also add in a third level of city, country, and continent, so long as you parent/child them properly. Note that Canada and Mexico were separated out of North America since the original plugin options covered the United States. 52 52 53 53 == Screenshots == … … 61 61 62 62 == Changelog == 63 = 1.1.0 = 64 * Introduced Continents for World categorization 65 * Fixed typo bug when trying to use Washington, DC 66 * Renamed archive template ID to be more specific to plugin content and not conflict with general theme naming 67 * Removed ACF Field option from settings page due to lack of usage 68 63 69 = 1.0.13 = 64 70 * Updated archive content to be a pluggable function, allowing for different find and replace options in a child function. -
socius-marketing-page-taxonomy/trunk/socius-marketing-page-taxonomy.php
r1747486 r1756170 4 4 * Plugin URI: http://sociusmarketing.com 5 5 * Description: Adds custom taxonomies for product categories and areas served. Be sure to update your permalinks after activation. 6 * Version: 1. 0.136 * Version: 1.1.0 7 7 * Author: Socius Marketing 8 8 * Author URI: http://sociusmarketing.com
Note: See TracChangeset
for help on using the changeset viewer.