without placeholder attribute and focus selector to support IE 7-9
A Pen by Oliver Knoblich on CodePen.
without placeholder attribute and focus selector to support IE 7-9
A Pen by Oliver Knoblich on CodePen.
| <?php if ( 'post_type' == get_post_type() ) : | |
| $term_list = get_the_terms( $post->ID, 'custom_taxonomy' ); // get the taxonomy terms | |
| if ( count($term_list) > 2 ) { // if there are more than 2 terms, use a comma, e.g.: this, this, that | |
| $sep = __( ', ', 'textdomain' ); | |
| } elseif ( count($term_list) === 2 ) { // if there are EXACTLY 2 terms, use an "and", e.g.: this and that | |
| $sep = __( ' and ', 'textdomain' ); | |
| } else { // there there is only one (or no) terms, don't use anything | |
| $sep = null; | |
| } | |
| $sep_num = 1; // we'll use this as a counter later |
| # This is a template .gitignore file for git-managed WordPress projects. | |
| # | |
| # Fact: you don't want WordPress core files, or your server-specific | |
| # configuration files etc., in your project's repository. You just don't. | |
| # | |
| # Solution: stick this file up your repository root (which it assumes is | |
| # also the WordPress root directory) and add exceptions for any plugins, | |
| # themes, and other directories that should be under version control. | |
| # | |
| # See the comments below for more info on how to add exceptions for your |