From 6834ec5ce71d76f2e9c7f57f3ec7b1fa996cd5ec Mon Sep 17 00:00:00 2001 From: Roy Date: Tue, 4 Apr 2017 10:18:41 -0400 Subject: [PATCH] Adding code from old plugin --- grandchild-functions.php | 647 ++++++++++++++++++++++++++++- grandchild-scripts.js | 34 ++ template-class.php | 4 +- templates/_notes/dwsync.xml | 15 +- templates/archive-programs.php | 139 +++++++ templates/nav-tabs.php | 2 +- templates/page-course-subjects.php | 121 ++++++ templates/page.php | 38 ++ templates/single-courses.php | 71 ++++ templates/taxonomy-subjects.php | 103 +++++ 10 files changed, 1163 insertions(+), 11 deletions(-) create mode 100644 grandchild-scripts.js create mode 100644 templates/archive-programs.php create mode 100644 templates/page-course-subjects.php create mode 100644 templates/page.php create mode 100644 templates/single-courses.php create mode 100644 templates/taxonomy-subjects.php diff --git a/grandchild-functions.php b/grandchild-functions.php index 3f0c4b5..91d469a 100644 --- a/grandchild-functions.php +++ b/grandchild-functions.php @@ -26,16 +26,55 @@ function grandchild_template_include_grad2016( $template ) { if ( file_exists( untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' . basename( $template ) ) ) $template = untrailingslashit( plugin_dir_path( __FILE__ ) ) . '/templates/' . basename( $template ); - $post_types = array('archive'); + $post_types = array('courses'); if (is_singular($post_types)) { - $template = plugin_dir_path( __FILE__ ).'templates/archive.php'; + $template = plugin_dir_path( __FILE__ ).'templates/single-courses.php'; } - return $template; + elseif(is_tax('subjects')) { + $template = plugin_dir_path( __FILE__ ).'templates/taxonomy-subjects.php'; + } + return $template; } add_filter( 'template_include', 'grandchild_template_include_grad2016', 11 ); +function gradschool_breadcrumbs(){ + $thisID = get_the_ID(); + $ancestors = get_ancestors($thisID, 'page'); + $ancestors = array_reverse($ancestors); + + + if ($ancestors) { + echo ''; + } + } +function filter_search($query) { + if ($query->is_search) { + $query->set('post_type', array('post', 'courses')); + }; + return $query; +}; +add_filter('pre_get_posts', 'filter_search'); function string_limit_words($string, $word_limit) @@ -122,5 +161,607 @@ add_filter( 'get_custom_footer', function( $footer ) { return plugin_dir_path( __FILE__ ).'templates/footer.php'; }, 99 ); +/******************************************************************** + + Register Custom Course Post Type + +********************************************************************/ + +function create_course_post_type() { + register_post_type( 'courses', array( + 'labels' => array( + 'name' => __('Courses'), + 'singular_name' => __('Course'), + 'menu_name' => __('Courses'), + 'name_admin_bar' => __('Course'), + 'add_new' => __('Add New'), + 'add_new_item' => __('Add New Course'), + ), + 'description' => 'Post Template for a course.', + 'public' => true, + 'has_archive' => true, + 'rewrite' => array( 'slug' => "graduate-courses/%subjects%", 'with_front' => false), + 'capability_type' => 'post', + 'hierarchical' => false, + 'supports' => array( 'title', 'editor', 'revisions' ), // Also author, thumbnail, excerpt, trackbacks, custom-fields, comments, page-attributes, post-formats + 'query_var' => true, + 'taxonomies' => array('subjects'), + ) ); + flush_rewrite_rules(); +}; + +add_action('init', 'create_course_post_type'); + + +// Registers the Course Subjects / Concentrations +function course_taxonomies() { + register_taxonomy('subjects', 'courses', array( + 'labels' => array( + 'name' => __('Subjects'), + 'singular_name' => __('Subject'), + 'search_items' => __('Search Course Subjects'), + 'all_items' => __('All Course Subjects'), + 'parent_item' => __('Subject'), + 'parent_item_colon' => __('Subject:'), + 'edit_item' => __('Edit Subject'), + 'update_item' => __('Update Subject'), + 'add_new_item' => __('Add New Subject'), + 'new_item_name' => __('New Subject'), + 'menu_name' => __('Course Subjects') + ), + 'hierarchical' => true, + 'query_var' => true, + 'rewrite' => array( 'slug' => 'graduate-courses', 'with_front' => true), + ) ); +} + +add_action('init', 'course_taxonomies', 0); + +function custom_rewrite_flush() { + global $wp_rewrite; + $wp_rewrite->flush_rules(); +} + +add_action('init', 'custom_rewrite_flush'); + +/******************************************************************** + + Register Course Rewrites + +********************************************************************/ + +function course_permalink($post_link, $post, $leavename) { + if (false !== strpos($post_link, '%subjects%' )) { + + $subj_terms = get_the_terms($post->ID, 'subjects'); + // $catnum = get_post_meta( $post->ID, 'catalog_number', true); + $subject = array_pop($subj_terms)->slug; + + $post_link = str_replace( "%subjects%", $subject, $post_link); + // $post_link = str_replace( "%catalog_number%", $catnum, $post_link); + + } + return $post_link; +} + add_filter('post_type_link', 'course_permalink', 10, 4); + +// THIS IS THE CODE FOR THE GRAD SCHOOL COURSE SECTION + +/******************************************************************** + + Register Catalog Number Box + +********************************************************************/ +// Registers Catalog Number Box +function catalog_number_box() { + add_meta_box( + 'catalog_number_box', + __('Catalog Number'), + 'catalog_number_box_content', + 'courses', + 'side', + 'default' + ); +} + +// Registers Catalog Number Box Content +function catalog_number_box_content($post) { + wp_nonce_field( plugin_basename( __FILE__ ), 'catalog_number_box_content_nonce'); + $catalog_number_val = get_post_meta($post->ID, 'catalog_number', true); + echo ''; + echo ''; +} + +add_action('add_meta_boxes', 'catalog_number_box'); + +// Action for Catalog Number on save +function catalog_number_box_save($post_id) { + global $post; + + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) + return; + + if (!wp_verify_nonce($_POST['catalog_number_box_content_nonce'], plugin_basename( __FILE__ ))) + return $post_id; + + if ('page' == $_POST['post_type']) { + if (!current_user_can('edit_page', $post_id)) + return; + } else { + if (!current_user_can('edit_post', $post_id)) + return; + } + + $catalog_number = sanitize_text_field($_POST['catalog_number']); + + $catalog_number_match = intval($catalog_number); + + if(!$catalog_number_match) { + update_post_meta($post_id, 'catalog_number', ''); + } else { + update_post_meta($post_id, 'catalog_number', $catalog_number); + } +} + +add_action('save_post', 'catalog_number_box_save', 10, 2); + + +/******************************************************************** + + Register Minimum Units + +********************************************************************/ +// Registers Min Unit Box +function min_unit_box() { + add_meta_box( + 'min_unit_box', + __('Minimum Units'), + 'min_unit_box_content', + 'courses', + 'side', + 'default' + ); +} + +// Registers Min Unit Box Content +function min_unit_box_content($post) { + wp_nonce_field( plugin_basename( __FILE__ ), 'min_unit_box_content_nonce'); + $min_unit_val = get_post_meta($post->ID, 'min_unit', true); + echo ''; + echo ''; +} + +add_action('add_meta_boxes', 'min_unit_box'); + +// Action for Min Unit on save +function min_unit_box_save($post_id) { + global $post; + + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) + return; + + if (!wp_verify_nonce($_POST['min_unit_box_content_nonce'], plugin_basename( __FILE__ ))) + return $post_id; + + if ('page' == $_POST['post_type']) { + if (!current_user_can('edit_page', $post_id)) + return; + } else { + if (!current_user_can('edit_post', $post_id)) + return; + } + + $min_unit = sanitize_text_field($_POST['min_unit']); + + $min_unit_match = floatval($min_unit); + + if(!$min_unit_match) { + update_post_meta($post_id, 'min_unit', '0.00'); + } else { + update_post_meta($post_id, 'min_unit', $min_unit); + } +} + +add_action('save_post', 'min_unit_box_save', 10, 2); + + +/******************************************************************** + + Register Maximum Units + +********************************************************************/ + +// Registers Max Unit Box +function max_unit_box() { + add_meta_box( + 'max_unit_box', + __('Maximum Units'), + 'max_unit_box_content', + 'courses', + 'side', + 'default' + ); +} + +// Registers Max Unit Box Content +function max_unit_box_content($post) { + wp_nonce_field( plugin_basename( __FILE__ ), 'max_unit_box_content_nonce'); + $max_unit_val = get_post_meta($post->ID, 'max_unit', true); + echo ''; + echo ''; +} + +add_action('add_meta_boxes', 'max_unit_box'); + +// Action for Max Unit on save +function max_unit_box_save($post_id) { + global $post; + + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) + return; + + if (!wp_verify_nonce($_POST['max_unit_box_content_nonce'], plugin_basename( __FILE__ ))) + return $post_id; + + if ('page' == $_POST['post_type']) { + if (!current_user_can('edit_page', $post_id)) + return; + } else { + if (!current_user_can('edit_post', $post_id)) + return; + } + + $max_unit = sanitize_text_field($_POST['max_unit']); + + $max_unit_match = floatval($max_unit); + + if(!$max_unit_match) { + update_post_meta($post_id, 'max_unit', '0.00'); + } else { + update_post_meta($post_id, 'max_unit', $max_unit); + } +} + +add_action('save_post', 'max_unit_box_save', 10, 2); + + +/******************************************************************** + + Register Prerequisites Box + +********************************************************************/ +// Registers Prerequisites Box +function prereq_box() { + add_meta_box( + 'prereq_box', + __('Prerequisites'), + 'prereq_box_content', + 'courses', + 'normal', + 'high' + ); +} + +// Registers Prerequisites Box Content +function prereq_box_content($post) { + wp_nonce_field( plugin_basename( __FILE__ ), 'prereq_box_content_nonce'); + $prereq_val = get_post_meta($post->ID, 'prereq', true); + echo ''; + echo ''; +} + +add_action('add_meta_boxes', 'prereq_box'); + +// Action for Prerequisites on save +function prereq_box_save($post_id) { + global $post; + + if (defined('DOING_AUTOSAVE') && DOING_AUTOSAVE ) + return; + + if (!wp_verify_nonce($_POST['prereq_box_content_nonce'], plugin_basename( __FILE__ ))) + return $post_id; + + if ('page' == $_POST['post_type']) { + if (!current_user_can('edit_page', $post_id)) + return; + } else { + if (!current_user_can('edit_post', $post_id)) + return; + } + + $prereq = sanitize_text_field($_POST['prereq']); + + if($prereq) + update_post_meta($post_id, 'prereq', $prereq); + +} + +add_action('save_post', 'prereq_box_save', 10, 2); + + +/******************************************************************** + + Register Course Archives + +********************************************************************/ + +function course_archives($query) { + if($query->is_tax('subjects') && $query->is_main_query() && !$query->is_singular('courses') ) { + $query->set( 'post_type', 'courses'); + $query->set( 'nopaging', true); + $query->set( 'order', 'ASC' ); + $query->set( 'orderby', 'meta_value_num' ); + $query->set( 'meta_key', 'catalog_number' ); + }; + return $query; +} +add_filter( 'pre_get_posts', 'course_archives' ); + +class UC_Grad{ + + // + // Create our hook for our create_post_type() method + // and hook our function to the 'init' action + // + public function __construct(){ + + add_action( $tag_action_hook = 'init', + $function_to_call = array( $this, 'create_post_type' ) , + 0); + + } + + + // + // Register our new custom post type + // + public function create_post_type() { + + $labels = array( + 'name' => _x( 'Programs', 'Post Type General Name', 'text_domain' ), + 'singular_name' => _x( 'Program', 'Post Type Singular Name', 'text_domain' ), + 'menu_name' => __( 'Programs', 'text_domain' ), + 'parent_item_colon' => __( 'Parent Program:', 'text_domain' ), + 'all_items' => __( 'All Programs', 'text_domain' ), + 'view_item' => __( 'View Program', 'text_domain' ), + 'add_new_item' => __( 'Add New Program', 'text_domain' ), + 'add_new' => __( 'New Program', 'text_domain' ), + 'edit_item' => __( 'Edit Program', 'text_domain' ), + 'update_item' => __( 'Update Program', 'text_domain' ), + 'search_items' => __( 'Search Program', 'text_domain' ), + 'not_found' => __( 'No programs found', 'text_domain' ), + 'not_found_in_trash' => __( 'No programs found in Trash', 'text_domain' ), + ); + $args = array( + 'label' => __( 'programs', 'text_domain' ), + 'description' => __( 'Program Post Type', 'text_domain' ), + 'labels' => $labels, + 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', 'comments', 'custom-fields', 'page-attributes', 'post-formats', 'categories' ), + 'hierarchical' => false, + 'public' => true, + 'show_ui' => true, + 'show_in_menu' => true, + 'show_in_nav_menus' => true, + 'show_in_admin_bar' => true, + 'menu_position' => 5, + 'menu_icon' => '', + 'can_export' => true, + 'has_archive' => true, + 'exclude_from_search' => false, + 'publicly_queryable' => true, + 'query_var' => 'programs', + 'capability_type' => 'page', + 'taxonomies' => array('category', 'post_tag'), + 'rewrite' => true + ); + register_post_type( 'programs', $args ); + flush_rewrite_rules(); + + } // create_post_type +} // Class + +// +// Create a new instance of UC Abroad +// + +$uc_abroad = new UC_Grad(); + +function program_archive_page_template( $archive_template ) { + if ( is_post_type_archive( 'programs' ) ) { + $archive_template = dirname( __FILE__ ) . '/templates/archive-programs.php'; + } + return $archive_template; +} +add_filter( 'archive_template', 'program_archive_page_template' ); + +//ACF Code +if( function_exists('acf_add_local_field_group') ): + +acf_add_local_field_group(array ( + 'key' => 'group_589b63448a751', + 'title' => 'Programs', + 'fields' => array ( + array ( + 'key' => 'field_589b786dd6901', + 'label' => 'Degree Filter', + 'name' => 'degree_filter', + 'type' => 'checkbox', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'choices' => array ( + 'masters' => 'Master\'s', + 'doctoral' => 'Doctoral/PhD', + 'certificate' => 'Certificate', + 'online' => 'Online', + ), + 'default_value' => array ( + ), + 'layout' => 'vertical', + 'toggle' => 0, + 'return_format' => 'value', + ), + array ( + 'key' => 'field_589b67cd3cc1f', + 'label' => 'Area\'s of Interest Filter', + 'name' => 'areas_of_interest_filter', + 'type' => 'checkbox', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'choices' => array ( + 'agriculture' => 'Agriculture', + 'business' => 'Business', + 'education' => 'Education', + 'engineering' => 'Engineering', + 'fine-arts' => 'Fine Arts', + 'health' => 'Health', + 'humanities' => 'Humanities', + 'natural-sciences' => 'Natural Sciences', + 'social-sciences' => 'Social Sciences', + ), + 'default_value' => array ( + ), + 'layout' => 'vertical', + 'toggle' => 0, + 'return_format' => 'value', + ), + array ( + 'key' => 'field_58a3644c7c370', + 'label' => 'Area of Interest Color', + 'name' => 'areas_of_interest_color', + 'type' => 'select', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'choices' => array ( + 'agriculture' => 'Agriculture', + 'business' => 'Business', + 'education' => 'Education', + 'engineering' => 'Engineering', + 'fine-arts' => 'Fine Arts', + 'health' => 'Health', + 'humanities' => 'Humanities', + 'natural-sciences' => 'Natural Sciences', + 'social-sciences' => 'Social Sciences', + ), + 'default_value' => array ( + ), + 'allow_null' => 1, + 'multiple' => 0, + 'ui' => 0, + 'ajax' => 0, + 'return_format' => 'value', + 'placeholder' => '', + ), + array ( + 'key' => 'field_589b6349b5862', + 'label' => 'Program URL', + 'name' => 'program_url', + 'type' => 'url', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'default_value' => '', + 'placeholder' => '', + ), + array ( + 'key' => 'field_589b6369b5863', + 'label' => 'Concentrations', + 'name' => 'concentrations', + 'type' => 'wysiwyg', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'default_value' => '', + 'tabs' => 'all', + 'toolbar' => 'full', + 'media_upload' => 1, + ), + array ( + 'key' => 'field_589b66f5d6681', + 'label' => 'Phone Number', + 'name' => 'phone_number', + 'type' => 'text', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'default_value' => '', + 'placeholder' => '', + 'prepend' => '', + 'append' => '', + 'maxlength' => '', + ), + array ( + 'key' => 'field_589b64ce3c849', + 'label' => 'Degrees', + 'name' => 'degrees', + 'type' => 'text', + 'instructions' => '', + 'required' => 0, + 'conditional_logic' => 0, + 'wrapper' => array ( + 'width' => '', + 'class' => '', + 'id' => '', + ), + 'default_value' => '', + 'placeholder' => '', + 'prepend' => '', + 'append' => '', + 'maxlength' => '', + ), + ), + 'location' => array ( + array ( + array ( + 'param' => 'post_type', + 'operator' => '==', + 'value' => 'programs', + ), + ), + ), + 'menu_order' => 0, + 'position' => 'normal', + 'style' => 'default', + 'label_placement' => 'top', + 'instruction_placement' => 'label', + 'hide_on_screen' => '', + 'active' => 1, + 'description' => '', +)); + +endif; ?> \ No newline at end of file diff --git a/grandchild-scripts.js b/grandchild-scripts.js new file mode 100644 index 0000000..5b57eab --- /dev/null +++ b/grandchild-scripts.js @@ -0,0 +1,34 @@ +jQuery(document).ready(function($){ + var degreeFilters = []; + var aoiFilters = []; + $('.degree-filter').change(function(){ + degreeFilters = []; + $('.degree-filter:checked').each(function(){ + degreeFilters.push($(this).val()); + }); + doFilter(); + }); + $('.aoi-filter').change(function(){ + aoiFilters = []; + $('.aoi-filter:checked').each(function(){ + aoiFilters.push($(this).val()); + }); + doFilter(); + }); + var doFilter = function(){ + var filters = $.merge($.merge( [], degreeFilters), aoiFilters); + //console.log(degreeFilters); + //console.log(aoiFilters); + //console.log(filters); + $('.program-grid').children().each(function(){ + $(this).css('display','block'); + var classes = $(this).attr('class').split(' '); + for(var i in filters){ + if($.inArray(filters[i],classes) === -1){ + $(this).css('display','none'); + break; + } + } + }); + }; +}); \ No newline at end of file diff --git a/template-class.php b/template-class.php index 2953bc1..edbed9a 100644 --- a/template-class.php +++ b/template-class.php @@ -92,9 +92,9 @@ class Page_Template_Plugin_grad2016 { // Add your templates to this array. $this->templates = array( - 'page-sample.php' => __( 'Sample', $this->plugin_slug ), 'page-grid-stories.php' => __( 'Page - Grid Stories', $this->plugin_slug ), - //'page-sample3.php' => __( 'Sample3', $this->plugin_slug ), + 'page-course-subjects.php' => __( 'Course-Subjects', $this->plugin_slug ), + 'page.php' => __( 'Page', $this->plugin_slug ), ); // adding support for theme templates to be merged and shown in dropdown diff --git a/templates/_notes/dwsync.xml b/templates/_notes/dwsync.xml index a35ddb5..3073285 100644 --- a/templates/_notes/dwsync.xml +++ b/templates/_notes/dwsync.xml @@ -1,8 +1,13 @@ - - - - - + + + + + + + + + + \ No newline at end of file diff --git a/templates/archive-programs.php b/templates/archive-programs.php new file mode 100644 index 0000000..c60c8e6 --- /dev/null +++ b/templates/archive-programs.php @@ -0,0 +1,139 @@ + + + + 'programs', + 'orderby' => 'title', + 'order' => 'ASC', + 'posts_per_page' => -1 +); +$posts = get_posts($args); +?> + +
+ +
+
+

Degrees

+
+ +
+
+
    +
  • +
  • +
  • +
  • +
+
+
+ +
+ +
+
+

Areas of Interest

+
+
+
+
    +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
  • +
+
+
+
+ + +
+
+ + + + +

+ +

+ + +
+
+
+ + + + + + diff --git a/templates/nav-tabs.php b/templates/nav-tabs.php index 665d816..45980c7 100644 --- a/templates/nav-tabs.php +++ b/templates/nav-tabs.php @@ -109,7 +109,7 @@ class="searchform" action="">
- +
diff --git a/templates/page-course-subjects.php b/templates/page-course-subjects.php new file mode 100644 index 0000000..a3de648 --- /dev/null +++ b/templates/page-course-subjects.php @@ -0,0 +1,121 @@ + +ID; + $url = wp_get_attachment_image_src( get_post_thumbnail_id($first_parent_Id), 'full'); + endwhile?> + + + +
+ + +
+
+
+
+ + + + '; + foreach($alpharay as $letter) { + echo '
  • ' . $letter . '
  • '; + }; + echo ''; + + // Counter for proper .row and .span placement + $colcount = 0; + + // Course Subject Query args + $args = array( + 'type' => 'post', + 'child_of' => 0, + 'parent' => '', + 'orderby' => 'name', + 'order' => 'ASC', + 'hide_empty' => 1, + 'hierarchical' => 1, + 'exclude' => '', + 'include' => '', + 'number' => '', + 'taxonomy' => 'subjects', + 'pad_counts' => false + ); + + // Subject Taxonomy array + $subject_list = get_categories($args); + + // Start by looping through the alphabet array + foreach( $alpharay as $letter ) { + $letter_exists = 0; + + // Determine whether there are subjects that start with current letter + foreach($subject_list as $subject) { + if(strpos($subject->name, $letter) === 0) { + $letter_exists = 1; + }; + }; + + // Perform if subjects exist starting with current letter + if($letter_exists) { + + // Create small list for each letter + if($colcount) { + echo '
    '; + echo '

    ' . $letter . '

    '; + echo ''; + echo '
    '; + echo '
    '; + $colcount = 0; + } else { + echo '
    '; + echo '
    '; + echo '

    ' . $letter . '

    '; + echo ''; + echo '
    '; + $colcount++; + }; + }; + + }; + + ?> + +
    + +
    + +
    + +
    + \ No newline at end of file diff --git a/templates/page.php b/templates/page.php new file mode 100644 index 0000000..ab94653 --- /dev/null +++ b/templates/page.php @@ -0,0 +1,38 @@ + + +
    + + +
    +
    +
    +
    + + + +
    +
    +
    + +
    + + +
    + diff --git a/templates/single-courses.php b/templates/single-courses.php new file mode 100644 index 0000000..7ca8921 --- /dev/null +++ b/templates/single-courses.php @@ -0,0 +1,71 @@ + +
    + +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    + \ No newline at end of file diff --git a/templates/taxonomy-subjects.php b/templates/taxonomy-subjects.php new file mode 100644 index 0000000..2838b3e --- /dev/null +++ b/templates/taxonomy-subjects.php @@ -0,0 +1,103 @@ + + + + +
    +
    +
    +
    +
    + + + + + ID, 'subjects'); // Get taxonomy information before title declaration ?> + +

    Archive for the ‘’ Category

    + +

    Posts Tagged ‘

    + +

    Archive for

    + +

    Archive for

    + +

    Archive for

    + +

    Author Archive for

    + +

    Blog Archives

    + + + + + + +
    + + + + + + +
    +

    +
    + + + + + + ID, 'subjects'); ?> +
    +
    +

    name . ' ' . get_post_meta(get_the_id(), 'catalog_number', true); ?> -

    +
    +
    + + More Information » +
    +
    +
    + +
    + + + +
    + Sorry, but there aren't any posts in the %s category yet.", single_cat_title('',false)); + } else if ( is_date() ) { // If this is a date archive + echo("

    Sorry, but there aren't any posts with this date.

    "); + } else if ( is_author() ) { // If this is a category archive + $userdata = get_userdatabylogin(get_query_var('author_name')); + printf("

    Sorry, but there aren't any posts by %s yet.

    ", $userdata->display_name); + } else { + echo("

    No posts found.

    "); + } + get_search_form(); + + endif; + ?> + +
    +
    + +
    + +
    +
    +