From: Anthony Talarico Date: Mon, 14 May 2018 15:48:03 +0000 (-0400) Subject: adding output for rooms custom post types X-Git-Tag: v1.0.0^2~23 X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=501b1a6031ab0e609f90a157b0fe6fec0af3fc17;p=WP-Themes%2Flaurium.git adding output for rooms custom post types adding custom fields output for the rooms page --- diff --git a/inc/rooms.php b/inc/rooms.php index 101135a..adcd638 100644 --- a/inc/rooms.php +++ b/inc/rooms.php @@ -67,7 +67,7 @@ function rooms_custom_post_type() { 'label' => __( GLM_ROOM_SINGLE ), 'description' => __( 'Custom ' . GLM_ROOM_PLURAL ), 'labels' => $labels, - 'supports' => array( 'title', 'thumbnail', 'revisions', 'editor', 'author', 'page-attributes','excerpt'), + 'supports' => array( 'title', 'thumbnail', 'revisions', 'editor', 'page-attributes'), 'hierarchical' => true, 'public' => true, 'show_ui' => true, diff --git a/rooms.php b/rooms.php index f119d68..dd72ee6 100644 --- a/rooms.php +++ b/rooms.php @@ -5,39 +5,82 @@ * @package accesspress_parallax */ -get_header();?> +get_header(); + global $post; + $taxonomy = 'rooms_category'; + $terms = get_terms($taxonomy); + $post = get_post($post->id); + $content = apply_filters('the_content', $post->post_content); + +?>
-
- 'glm-rooms', - 'post_status' => 'publish', - 'posts_per_page' => -1, - 'orderby' => 'menu_order' - )); - - while ($query->have_posts()) { - $query->the_post(); ?> -

-
- -
- + +
+ + name'>"; + + $query = new WP_Query(array( + 'post_type' => 'glm-rooms', + 'post_status' => 'publish', + 'posts_per_page' => -1, + 'orderby' => 'menu_order', + 'tax_query' => array( + array( + 'taxonomy' => 'rooms_category', + 'field' => 'term_id', + 'terms' => $term->term_id + ) + ) + )); ?> +
+ have_posts()) { + $query->the_post(); ?> +

+
+
+ +
+
+

Gallery

+
+ +
+
+
+

Ameneties

+
+ +
+
-
- - - + + +
+
+