Making WordPress.org

Changeset 1604


Ignore:
Timestamp:
05/20/2015 06:10:27 PM (11 years ago)
Author:
coffee2code
Message:

jobs.wordpress.net: On single pages, display the job category for the job (otherwise there is no context).

Location:
sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/content-single.php

    r88 r1604  
    1313                <div class="entry-meta">
    1414                        <?php jobswp_posted_on(); ?>
     15
     16                        <span class="job-categories">
     17                                <?php echo get_the_category_list(); ?>
     18                                <?php foreach ( get_the_terms( get_the_ID(), 'job_category' ) as $job_cat ) : ?>
     19                                        <span class="job-cat-item job-cat-item-<?php echo esc_attr( $job_cat->slug ); ?>"><?php echo esc_html( $job_cat->name ); ?></span>
     20                                <?php endforeach; ?>
     21                        </span>
    1522                </div><!-- .entry-meta -->
    1623        </header><!-- .entry-header -->
  • sites/trunk/jobs.wordpress.net/public_html/wp-content/themes/jobswp/style.css

    r1598 r1604  
    870870        padding-right: 1em;
    871871}
     872.job-categories {
     873        color: #999;
     874        line-height: 1.3em;
     875        border-left: 1px solid #ccc;
     876        margin-left: 10px;
     877        padding-left: 10px
     878}
    872879.all-job-categories, #all-job-categories {
    873880        margin-bottom: 3em;
Note: See TracChangeset for help on using the changeset viewer.