Ejemplo n.º 1
0
            echo '<div class="col-sm-4">';
            echo $page;
            echo '</li></div>';
            $i++;
        }
        echo '</div>';
    }
    list_pages_columns($featured_pages);
    ?>
									<hr>
									<header class="entry-header">
										<h2 class="entry-title">Artists Previously Exhibited</h2>
									</header>
									<?php 
    $previous_pages = wp_list_pages(array('child_of' => '10075', 'title_li' => '', 'echo' => false));
    list_pages_columns($previous_pages);
    ?>
									<div class="clearfix"></div>
									<?php 
    /**
     * This wp_link_pages option adapt to use bootstrap pagination style.
     * The other part of this pager is in inc/template-tags.php function name bootstrapBasicLinkPagesLink() which is called by wp_link_pages_link filter.
     */
    wp_link_pages(array('before' => '<div class="page-links">' . __('Pages:', 'bootstrap-basic') . ' <ul class="pagination">', 'after' => '</ul></div>', 'separator' => ''));
    ?>
								</div><!-- .entry-content -->

								<footer class="entry-meta">
									<?php 
    bootstrapBasicEditPostLink();
    ?>
Ejemplo n.º 2
0
 function list_pages_accordion($parent_id)
 {
     $pages = get_pages(array('parent' => $parent_id));
     $i = 0;
     foreach ($pages as $child) {
         // Count each page
         $i++;
         // Set first accordion to open
         if ($i === 1) {
             $expanded = 'true';
             $open = ' in';
         } else {
             $expanded = 'false';
             $open = '';
         }
         // Build the accordion
         echo '<div class="panel">';
         echo '<div class="panel-heading" role="tab" id="heading' . $i . '">';
         echo '<h4 class="panel-title">';
         echo '<a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse' . $i . '" aria-expanded="' . $expanded . '" aria-controls="collapse' . $i . '">';
         // Add the title
         echo get_the_title($child->ID);
         echo '<div class="glyphicon glyphicon-plus"></div>';
         echo '<div class="glyphicon glyphicon-minus"></div>';
         echo '</a>';
         echo '</h4>';
         echo '</div><!-- /.panel-heading -->';
         echo '<div id="collapse' . $i . '" class="panel-collapse collapse' . $open . '" role="tabpanel" aria-labelledby="heading' . $i . '">';
         echo '<div class="panel-body">';
         // Add the content
         list_pages_columns($child->ID);
         echo '</div><!-- /.panel-body -->';
         echo '</div><!-- /.panel-collapse -->';
         echo '</div><!-- /.panel -->';
         echo '<hr>';
     }
 }