Plugin Directory

Changeset 1756170


Ignore:
Timestamp:
10/31/2017 04:38:13 PM (8 years ago)
Author:
sociusmarketing
Message:

Version 1.1.0 - continents!

Location:
socius-marketing-page-taxonomy/trunk
Files:
4 added
8 edited

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}
    152@font-face {
    253    font-family: 'stateface';
     
    57108}
    58109.smct-category img,
    59 #content .smct-category img {
     110#smct_content .smct-category img {
    60111    margin:0 auto 5px;
    61112    display: block;
     
    93144    }
    94145.smct-image img,
    95 #content .smct-image img {
     146#smct_content .smct-image img {
    96147    display:block;
    97148    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  
    122122    if(get_the_ID() == get_option( 'smct_area_page_id' )) {
    123123
    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';
    173142            }
    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        }
    184186
    185187    }
     188
    186189    return $content;
    187190
     
    189192
    190193add_filter('the_content', 'smct_area_content');
    191 
    192194
    193195
  • socius-marketing-page-taxonomy/trunk/inc/options-page.php

    r1699048 r1756170  
    3939        add_settings_section( 'smct_section_two', 'Display Options', array( $this, 'section_callback' ), 'smct-options' );
    4040        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' );
    4242    }
    4343    public function section_callback( $arguments ) {
     
    5151            case 'smct_section_three':
    5252                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;
    5656        }
    5757    }
     
    139139                'default' => '',
    140140            ),
    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            // ),
    149149        );
    150150        foreach( $fields as $field ){
  • socius-marketing-page-taxonomy/trunk/inc/stateface.php

    r1585361 r1756170  
    11<?php
    2 function smct_determine_stateface($taxonomyName) {
     2function smct_determine_stateface($taxonomyName,$optional_class = null) {
    33
    4     switch (ucfirst($taxonomyName))
     4    $font_class = 'stateface';
     5
     6    switch ($taxonomyName)
    57    {
    6         case 'Alabama':
     8        case 'alabama':
    79            $stateface = 'B'; break;
    8         case 'Alaska':
     10        case 'alaska':
    911            $stateface = 'A'; break;
    10         case 'Arizona':
     12        case 'arizona':
    1113            $stateface = 'D'; break;
    12         case 'Arkansas':
     14        case 'arkansas':
    1315            $stateface = 'C'; break;
    14         case 'California':
     16        case 'california':
    1517            $stateface = 'E'; break;
    16         case 'Colorado':
     18        case 'colorado':
    1719            $stateface = 'F'; break;
    18         case 'Connecticut':
     20        case 'connecticut':
    1921            $stateface = 'G'; break;
    20         case 'Delaware':
     22        case 'delaware':
    2123            $stateface = 'H'; break;
    22         case 'Florida':
     24        case 'florida':
    2325            $stateface = 'I'; break;
    24         case 'Georgia':
     26        case 'georgia':
    2527            $stateface = 'J'; break;
    26         case 'Hawaii':
     28        case 'hawaii':
    2729            $stateface = 'K'; break;
    28         case 'Idaho':
     30        case 'idaho':
    2931            $stateface = 'M'; break;
    30         case 'Illinois':
     32        case 'illinois':
    3133            $stateface = 'N'; break;
    32         case 'Indiana':
     34        case 'indiana':
    3335            $stateface = 'O'; break;
    34         case 'Iowa':
     36        case 'iowa':
    3537            $stateface = 'L'; break;
    36         case 'Kansas':
     38        case 'kansas':
    3739            $stateface = 'P'; break;
    38         case 'Kentucky':
     40        case 'kentucky':
    3941            $stateface = 'Q'; break;
    40         case 'Louisiana':
     42        case 'louisiana':
    4143            $stateface = 'R'; break;
    42         case 'Maine':
     44        case 'maine':
    4345            $stateface = 'U'; break;
    44         case 'Maryland':
     46        case 'maryland':
    4547            $stateface = 'T'; break;
    46         case 'Massachusetts':
     48        case 'massachusetts':
    4749            $stateface = 'S'; break;
    48         case 'Michigan':
     50        case 'michigan':
    4951            $stateface = 'V'; break;
    50         case 'Minnesota':
     52        case 'minnesota':
    5153            $stateface = 'W'; break;
    52         case 'Mississippi':
     54        case 'mississippi':
    5355            $stateface = 'Y'; break;
    54         case 'Missouri':
     56        case 'missouri':
    5557            $stateface = 'X'; break;
    56         case 'Montana':
     58        case 'montana':
    5759            $stateface = 'Z'; break;
    58         case 'Nebraska':
     60        case 'nebraska':
    5961            $stateface = 'c'; break;
    60         case 'Nevada':
     62        case 'nevada':
    6163            $stateface = 'g'; break;
    62         case 'New Hampshire':
     64        case 'new-hampshire':
    6365            $stateface = 'd'; break;
    64         case 'New Jersey':
     66        case 'new-jersey':
    6567            $stateface = 'e'; break;
    66         case 'New Mexico':
     68        case 'new-mexico':
    6769            $stateface = 'f'; break;
    68         case 'New York':
     70        case 'new-york':
    6971            $stateface = 'h'; break;
    70         case 'North Carolina':
     72        case 'north-carolina':
    7173            $stateface = 'a'; break;
    72         case 'North Dakota':
     74        case 'north-dakota':
    7375            $stateface = 'b'; break;
    74         case 'Ohio':
     76        case 'ohio':
    7577            $stateface = 'i'; break;
    76         case 'Oklahoma':
     78        case 'oklahoma':
    7779            $stateface = 'j'; break;
    78         case 'Oregon':
     80        case 'oregon':
    7981            $stateface = 'k'; break;
    80         case 'Pennsylvania':
     82        case 'pennsylvania':
    8183            $stateface = 'l'; break;
    82         case 'Rhode Island':
     84        case 'rhode-island':
    8385            $stateface = 'm'; break;
    84         case 'South Carolina':
     86        case 'south-carolina':
    8587            $stateface = 'n'; break;
    86         case 'South Dakota':
     88        case 'south-dakota':
    8789            $stateface = 'o'; break;
    88         case 'Tennessee':
     90        case 'tennessee':
    8991            $stateface = 'p'; break;
    90         case 'Texas':
     92        case 'texas':
    9193            $stateface = 'q'; break;
    92         case 'Utah':
     94        case 'utah':
    9395            $stateface = 'r'; break;
    94         case 'Vermont':
     96        case 'vermont':
    9597            $stateface = 't'; break;
    96         case 'Virginia':
     98        case 'virginia':
    9799            $stateface = 's'; break;
    98         case 'Washington':
     100        case 'washington':
    99101            $stateface = 'u'; break;
    100         case 'Washington, DC':
     102        case 'washington-dc':
    101103            $stateface = 'y'; break;
    102         case 'West Virginia':
     104        case 'west-virginia':
    103105            $stateface = 'w'; break;
    104         case 'Wisconsin':
     106        case 'wisconsin':
    105107            $stateface = 'v'; break;
    106         case 'Wyoming':
     108        case 'wyoming':
    107109            $stateface = 'x'; break;
     110        case 'united-states':
     111            $stateface = 'z'; break;
     112        default :
     113            $stateface = '';
    108114    }
    109115
     116    $internationl_locations = array('africa','asia','australia','caribbean','canada','central-america','europe','mexico','middle-east','south-america');
    110117    if($stateface == '') {
    111         $stateface = 'z';
     118        $stateface = '';
     119        $font_class = 'worldface icon-'.$taxonomyName;
    112120    }
    113121
    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;
    115129}
  • socius-marketing-page-taxonomy/trunk/inc/template-archive.php

    r1747486 r1756170  
    99?>
    1010        <div id="container" class="<?php echo $smct_container_width; ?>">
    11             <div id="content" role="main">
     11            <div id="smct_content" role="main">
    1212
    1313<?php
     
    3030                $page_parent_id = end($page_parent_ids);
    3131                $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                }
    3237            ?>
    3338           
    34             <h1 class="smct-page-title">
     39            <h1 class="smct-page-title">               
    3540                <?php if ( is_tax('smct_cats') ) {
    3641                    $category = get_the_terms($post->ID,'smct_cats');
     
    4045                        echo $current_page->name . ' Areas Served';
    4146                    } 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                        }
    4354                    }
    4455                } else {
     
    8394
    8495            <?php if(is_tax('smct_areas')) {//If is Area Page
    85 
    8696                if (array_key_exists($term_id, $hierarchy)) {// If is State Page                           
    8797
     
    90100                    echo '<div id="smct-cities-listing">';
    91101                    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>';
    93103                        echo '<div class="smct-col-sm-8 smct-col-xs-12">';
    94104                            echo '<ul>';
    95                             $cities_array = array();   
     105                            $cities_array = array();
    96106                                foreach ( $termchildren as $child ) {
    97107                                    $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                                }       
    100116                            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 {
    101125                                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                                    }
    103129                                }
     130                            }
    104131                            echo '</ul>';
    105132                        echo '</div>';
     
    107134                    echo '</div>';
    108135 
    109                 }
     136                } 
    110137            } ?>
    111138
  • socius-marketing-page-taxonomy/trunk/readme.txt

    r1747486 r1756170  
    44Requires at least: 3.0.1
    55Tested up to: 4.8
    6 Stable tag: 1.0.13
     6Stable tag: 1.1.0
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    4848A. The image is pulled from the page content. The Category cover image is the content image from the first page within that Category.
    4949
    50 = Q. Why 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? =
     51A. 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.
    5252
    5353== Screenshots ==
     
    6161
    6262== 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
    6369= 1.0.13 =
    6470* 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  
    44 * Plugin URI: http://sociusmarketing.com
    55 * Description: Adds custom taxonomies for product categories and areas served. Be sure to update your permalinks after activation.
    6  * Version: 1.0.13
     6 * Version: 1.1.0
    77 * Author: Socius Marketing
    88 * Author URI: http://sociusmarketing.com
Note: See TracChangeset for help on using the changeset viewer.