Plugin Directory

Changeset 1875668


Ignore:
Timestamp:
05/16/2018 03:42:48 PM (8 years ago)
Author:
sociusmarketing
Message:

Version 1.1.3 - Category archive hide thumbnail option

Location:
socius-marketing-page-taxonomy/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • socius-marketing-page-taxonomy/trunk/css/styles.css

    r1756170 r1875668  
    106106    text-align:center;
    107107    margin-bottom:20px;
     108}
     109.smct-category.smct-list  {
     110    text-align:left;
     111}
     112.smct-category.smct-list .smct-image-wrap {
     113    display: none;
    108114}
    109115.smct-category img,
  • socius-marketing-page-taxonomy/trunk/css/styles.min.css

    r1756170 r1875668  
    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%}}
     1.stateface,.worldface{display:block;font-size:150px;line-height:1;text-transform:none!important;text-align:center}.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-category.smct-list{text-align:left}.smct-category.smct-list .smct-image-wrap{display:none}#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

    r1756170 r1875668  
    7272                      while ($the_query->have_posts() ) {
    7373                        $the_query->the_post();
    74                             if( smct_grab_first_image_for_categories() ) {
    75                                 if($i < 1 ) {
    76                                     $first_image = smct_grab_first_image_for_categories();
    77                                         if (strpos($first_image, 'default') !== false) {
    78                                             $cat_content = category_description($term->term_id);
    79                                             $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $cat_content, $matches);
    80                                             if (isset($matches[1][0])) { $first_image = $matches[1][0]; }
    81                                         } else {
    82                                             //use default image
    83                                         }
     74                        if( smct_grab_first_image_for_categories() ) {
     75                            if($i < 1 ) {
     76                                $first_image = smct_grab_first_image_for_categories();
     77                                    if (strpos($first_image, 'default') !== false) {
     78                                        $cat_content = category_description($term->term_id);
     79                                        $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $cat_content, $matches);
     80                                        if (isset($matches[1][0])) { $first_image = $matches[1][0]; }
     81                                    } else {
     82                                        //use default image
     83                                    }
    8484                                    $i++;
    8585                                }
     
    9090
    9191                $smct_number_of_columns = get_option('smct_number_of_columns');
    92                 if($smct_number_of_columns[0] == '3wide') {
     92                $display_images = get_option('smct_category_display_layout');
     93                if($display_images[0] == 'no') {
     94                    $width = 'smct-col-xs-12 smct-category smct-list';
     95                } elseif($smct_number_of_columns[0] == '3wide') {
    9396                    $width = 'smct-col-md-4 smct-col-sm-6 smct-category';
    9497                } else {
    9598                    $width = 'smct-col-md-3 smct-col-sm-6 smct-category';
    9699                }
     100
    97101                $content .= '<div id="smct-' . $term->slug . '" class="'. $width .'">';
    98102                    $content .= '<h3><a href="' . esc_url( get_term_link( $term ) ) . '"><span class="smct-image-wrap" style="background-image:url(' . $first_image . ')"></span>' . $term->name . '</a></h3>';
  • socius-marketing-page-taxonomy/trunk/inc/options-page.php

    r1756170 r1875668  
    8181                'uid' => 'smct_display_page_titles',
    8282                'label' => 'Display Page Titles in the Content?',
     83                'section' => 'smct_section_two',
     84                'type' => 'radio',
     85                'options' => array(
     86                    'yes' => 'Yes',
     87                    'no' => 'No',
     88                ),
     89                'default' => array('yes'),
     90            ),
     91            array(
     92                'uid' => 'smct_category_display_layout',
     93                'label' => 'Display Images in Category Archive?',
    8394                'section' => 'smct_section_two',
    8495                'type' => 'radio',
  • socius-marketing-page-taxonomy/trunk/inc/template-archive.php

    r1875495 r1875668  
    144144
    145145                        <?php
     146                            $display_images = get_option('smct_category_display_layout');
    146147                            $row_width = 'smct-row';
    147148                            $left_col_widths = 'smct-col-md-3 smct-col-sm-4 smct-col-xs-12 smct-image';
    148149                            $right_col_widths = 'smct-col-md-9 smct-col-sm-8 smct-col-xs-12 smct-text';
    149150                            $photo = smct_grab_first_image();
    150                             if(empty($photo)) {
     151                            if(empty($photo) || $display_images[0] == 'no') {
    151152                                $row_width = '';
    152153                                $left_col_widths = 'hidden-xs hidden-sm hidden-md hidden-lg';
    153154                                $right_col_widths = 'smct-col-xs-12 smct-text';
    154                         } ?>
     155                            }
     156                        ?>
    155157                        <div class="smct-archive-summary <?php echo $row_width; ?>">
     158                            <?php if(!empty($photo) && $display_images[0] !== 'no') { ?>
    156159                            <div class="<?php echo $left_col_widths;?>">
    157160                                <a href="<?php the_permalink(); ?>"><span class="smct-image-wrap" style="background-image:url(<?php echo smct_grab_first_image(); ?>)"></span></a>
    158161                            </div>
     162                            <?php } ?>
    159163                            <div class="<?php echo $right_col_widths;?>">
    160164                                <h3 class="smct-archive-title"><a href="<?php the_permalink(); ?>" title="<?php printf( the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark">
    161165                                <?php //Use Custom Page Title meta, if there is one
    162                                     if(get_option('smct_alternate_page_title') !== '') {
     166                                    if(get_option('smct_alternate_page_title') !== false) {
    163167                                        if( class_exists('acf') ) {
    164168                                            if(get_field(get_option('smct_alternate_page_title'))) {
    165169                                                the_field(get_option('smct_alternate_page_title'));
    166170                                            } elseif (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h1>'), $matches)) {
    167                                                 if(!empty($matches)) {
     171                                                if(empty($matches)) {
    168172                                                    if (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h3>'), $matches)) {
    169173                                                        echo strip_tags($matches[0][0]);
     
    176180                                            }
    177181                                        } elseif (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h1>'), $matches)) {
    178                                             if(!empty($matches)) {
     182                                            if(empty($matches)) {
    179183                                                if (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h3>'), $matches)) {
    180184                                                    echo strip_tags($matches[0][0]);
     
    188192                                    //Check for H1 first; use H3 as a fallback
    189193                                    } elseif (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h1>'), $matches)) {
    190                                         if(!empty($matches)) {
     194                                        if(empty($matches)) {
    191195                                            if (preg_match_all('#(<h[0-6].*?>).*?(</h[0-6]>)#', strip_tags(get_the_content(),'<h3>'), $matches)) {
    192196                                                echo strip_tags($matches[0][0]);
  • socius-marketing-page-taxonomy/trunk/readme.txt

    r1875495 r1875668  
    44Requires at least: 3.0.1
    55Tested up to: 4.9
    6 Stable tag: 1.1.2
     6Stable tag: 1.1.3
    77License: GPLv2 or later
    88License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    6161
    6262== Changelog ==
     63= 1.1.3 =
     64* Added option to hide thumbnails on category archive
     65
    6366= 1.1.2 =
    6467* Edited query for archive page title to only pull H3 if there is no H1
  • socius-marketing-page-taxonomy/trunk/socius-marketing-page-taxonomy.php

    r1875495 r1875668  
    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.1.2
     6 * Version: 1.1.3
    77 * Author: Socius Marketing
    88 * Author URI: http://sociusmarketing.com
Note: See TracChangeset for help on using the changeset viewer.