'label' => __( 'Fact', 'text_domain' ),
'description' => __( 'Fact information page.', 'text_domain' ),
'labels' => $labels,
- 'supports' => array( 'title', 'editor', 'revisions' ),
+ 'supports' => array( 'title', 'editor', 'revisions', 'page-attributes' ),
'taxonomies' => array( 'category' ),
- 'hierarchical' => false,
+ 'hierarchical' => true,
'public' => true,
'show_ui' => true,
'show_in_menu' => true,
<div id="facts-slider-container">
<ul id="facts-slider">
<?php
- // See functions: fact_post_type, "Facts" in admin
- $query = new WP_Query(array(
+ // See functions: fact_post_type, "Facts Slider" in admin
+ $args = array(
+ 'numberposts' => -1,
+ 'orderby' => 'menu_order',
+ 'order' => 'ASC',
'post_type' => 'facts',
'post_status' => 'publish'
- ));
+ );
-
- while ($query->have_posts()) {
- $query->the_post();
+ $facts_loop = new WP_Query( $args );
+
+ while ($facts_loop->have_posts()) {
+ $facts_loop->the_post();
$post_id = get_the_ID();
$post_content = get_the_content($post_id);