Пример #1
0
    /**
     *
     * @param string $query post query
     * @param string $tpl template file
     * @param array $data additional post data
     */
    public static function tpl($query = 'showposts=5', $tpl = 'index', $data = array('thumbnail' => 'slider-image', 'id' => 'cycle'))
    {
        //echo "<div class='slider'>";
        //core_mods::modules('index', 'cycle');
        //echo "</div>";
        if (is_array($data)) {
            extract($data);
        }
        ?>
         <div class="cycle-slider">
            <div id="<?php 
        echo isset($id) ? $id : 'cycle';
        ?>
">
                <?php 
        $q_cycle = new WP_Query('showposts=5');
        ?>
                <?php 
        if ($q_cycle->have_posts()) {
            ?>
                    <?php 
            while ($q_cycle->have_posts()) {
                $q_cycle->the_post();
                ?>
                        <?php 
                //core_module::tpl("index", 'cycle',$data)
                ?>
                        <?php 
                cwp_layout::tpl_part('cycle', 'index');
                ?>
                    <?php 
            }
            ?>
                <?php 
        }
        ?>
            </div>
        </div>
        <div class="cycle-nav"><a id="prev" href="#">Prev</a> <a id="next" href="#">Next</a></div>

        <?php 
    }
Пример #2
0
<?php 
}
?>

<?php 
/* Start the Loop */
while (have_posts()) {
    the_post();
    ?>


    <?php 
    ?>
<?php// cwp::get_tpl_content((get_post_format() ? get_post_format() : 'general')); ?>
    <?php 
    cwp_layout::tpl_part(get_post_format() ? get_post_format() : 'general');
    ?>

<?php 
}
?>

<?php 
/* Display navigation to next/previous pages when applicable */
if ($wp_query->max_num_pages > 1) {
    ?>
    <nav id="nav-below">
        <h1 class="section-heading"><?php 
    _e('Post navigation', 'basejump');
    ?>
</h1>
Пример #3
0
    echo apply_filters('archive_meta', '<div class="archive-meta">' . $categorydesc . '</div>');
}
?>
</header>

<?php 
/* Display navigation to next/previous pages when applicable */
?>


<?php 
/* Start the Loop */
while (have_posts()) {
    the_post();
    ?>

    <?php 
    //get_template_part( 'content', get_post_format() );
    ?>
    <?php 
    cwp_layout::tpl_part('base', get_post_format() ? get_post_format() : 'general');
    ?>

<?php 
}
?>

<?php 
/* Display navigation to next/previous pages when applicable */
cwp_layout::tpl_part('base', 'post-nav');
<?php 
/* Start the Loop */
while (have_posts()) {
    the_post();
    ?>

        <?php 
    //get_template_part('content', get_post_format());
    ?>
        <?php 
    //cwp::get_tpl_content((get_post_format() ? get_post_format() : 'general'));
    ?>

        <li>
        <?php 
    cwp_layout::tpl_part('base', 'themes');
    ?>
        </li>

        <?php 
}
?>
</ul>
<?php 
/* Display navigation to next/previous pages when applicable */
?>
    <?php 
if ($wp_query->max_num_pages > 1) {
    ?>
    <nav id="nav-below">
    <!--        <h1 class="section-heading"><?php 
Пример #5
0
 /**
  *
  * @param type $slug
  */
 public static function header($slug = null)
 {
     $tpl = 'header';
     if (isset($slug)) {
         $tpl = "{$slug}-header";
     }
     cwp_layout::tpl_part(null, $tpl);
 }
Пример #6
0
            <?php 
//masonry::tpl('post_type=page&showposts=4&order=ASC&orderby=menu_order');
?>
            <?php 
$m_q = new WP_Query('post_type=page&showposts=4&order=ASC&orderby=menu_order');
if ($m_q->have_posts()) {
    while ($m_q->have_posts()) {
        $m_q->the_post();
        ?>
                    <div class="three columns">
                        <div <?php 
        post_class();
        ?>
>
                        <!-- container -->
                        <?php 
        $masonry_tpl = get_post_format() ? get_post_format() : 'grid';
        ?>
                        <?php 
        cwp_layout::tpl_part('masonry', "masonry-{$masonry_tpl}");
        ?>
                        <div class="clear">Cleared</div>
                        </div>
                    </div>
                <?php 
    }
}
?>
    </div>
</div>
Пример #7
0
 /**
  *
  * Uses WP_Query to create post loops
  * @param string / array $query
  * @param string $tpl_slug // default - base
  * @param string $tpl_name // default - general
  * @param string $def_tpl
  * <code></code>
  */
 public static function query($query = 'showposts=5', $tpl_slug = null, $tpl_name = null, $def_tpl = 'no_post')
 {
     global $post;
     $wp = new WP_Query();
     $wp->query($query);
     if ($wp->have_posts()) {
         while ($wp->have_posts()) {
             $wp->the_post();
             $post_type = get_post_type();
             $post_format = get_post_format() ? get_post_format() : 'general';
             if ($tpl_slug == 'post_type') {
                 $tpl_slug = $post_type;
             }
             if ($tpl_slug == 'format') {
                 $tpl_slug = $post_format;
             }
             $slug = isset($tpl_slug) ? $tpl_slug : 'base';
             $name = isset($tpl_name) ? $tpl_name : 'general';
             cwp_layout::tpl_part($slug, $name);
         }
     } else {
         cwp_layout::tpl_part(null, $def_tpl);
     }
     wp_reset_postdata();
 }
Пример #8
0
        the_post();
        ?>
                <?php 
        core_functions::setPostViews();
        ?>

        <section id="post-content">

            <?php 
        //get_template_part('content', 'single');
        ?>
            <?php 
        //cwp::get_tpl_content('single');
        ?>
                    <?php 
        cwp_layout::tpl_part('base', 'single');
        ?>

        </section>
        <section id="author-info">
            <div class="row">
                        <div class="two columns">
<div class="authoravatar"> <?php 
        if (function_exists('get_avatar')) {
            echo get_avatar(get_the_author_meta('email'), 60);
        }
        ?>
            </div>
                            <!-- ###end-row### -->
                        </div>
Пример #9
0
?>

<!-- ###### -->

<div class="row">
    <div class="span8">
       <?php 
//cwp::get_tpl_content('page');
?>

        <?php 
while (have_posts()) {
    the_post();
    ?>
            <?php 
    cwp_layout::tpl_part('base', 'page');
    ?>
            <?php 
    //get_template_part('content', 'page');
    ?>

            <?php 
    //comments_template('', true);
    ?>

        <?php 
}
// end of the loop.
?>
       <!-- class content -->
    </div>
Пример #10
0
    ?>

    <?php 
    /* Start the Loop */
    ?>
    <?php 
    while (have_posts()) {
        the_post();
        ?>


      <?php 
        //cwp::get_tpl_content('search');
        ?>
     <?php 
        cwp_layout::tpl_part('base', 'search');
        ?>


    <?php 
    }
    ?>

    <?php 
    /* Display navigation to next/previous pages when applicable */
    ?>
    <?php 
    if ($wp_query->max_num_pages > 1) {
        ?>
        <nav id="nav-below">
            <h1 class="section-heading"><?php 
Пример #11
0
        <?php 
        core_functions::setPostViews();
        ?>

        <section id="post-content">


            <?php 
        //get_template_part('content', 'single');
        ?>
            <?php 
        $bj_single_prefix = get_post_format() ? get_post_format() . '-' : '';
        ?>

        <?php 
        cwp_layout::tpl_part('base', $bj_single_prefix . 'single');
        ?>

        </section>
        <section id="author-info">
            <div class="row-fluid">
                <div class="span1">
                    <div class="authoravatar"> <?php 
        if (function_exists('get_avatar')) {
            echo get_avatar(get_the_author_meta('email'), 60);
        }
        ?>
                    </div>
                    <!-- ###end-row### -->
                </div>