示例#1
0
" class="page-content">
		<div class="row collapse">
			<div class="small-12 columns">

				<?php 
if (have_posts()) {
    global $post;
    ?>

					<ul class="accordion" data-accordion>

						<?php 
    while (have_posts()) {
        the_post();
        // Only show if in current bucket (or if no bucket is set, show all)
        if ($bucket = applegate_get_bucket()) {
            if (!in_array($bucket, (array) get_post_meta(get_the_ID(), 'applegate_buckets', true))) {
                continue;
            }
        }
        ?>
							<li <?php 
        post_class(array('accordion-navigation'));
        ?>
>

								<a href="#<?php 
        echo $post->post_name;
        ?>
">
									<?php 
示例#2
0
function _applegate_bucket_wptoolbar($wp_admin_bar)
{
    if (is_admin()) {
        return;
    }
    $bucket = applegate_get_bucket();
    $args = array('id' => 'applegate_bucket', 'title' => 'Current Bucket: ' . ($bucket ? get_buckets()[$bucket]['title'] : 'None'));
    $wp_admin_bar->add_node($args);
}