예제 #1
0
            ?>
"><?php 
            the_title();
            ?>
</a></h2>
                            </div>
                            <div class="content music">
                                <?php 
            the_content();
            ?>
                            </div>
                        <?php 
        }
        ?>
                        <?php 
        if (in_array(incir_post_format(get_the_ID()), array('post-normal', 'post-quote', 'post-image')) && !empty(incir_social_share())) {
            ?>
                            <hr/>
                            <div class="social">
                                <ul>
                                    <?php 
            foreach (incir_social_share() as $row) {
                ?>
                                        <li><?php 
                echo $row;
                ?>
</li>
                                    <?php 
            }
            ?>
                                </ul>
예제 #2
0
파일: tag.php 프로젝트: enesgur/incir-wp
"><?php 
            the_title();
            ?>
</a>
                                    </h2>
                                </div>
                                <div class="music">
                                    <?php 
            the_content();
            ?>
                                </div>
                            <?php 
        }
        ?>
                            <?php 
        if (in_array(incir_post_format(get_the_ID()), array('post-normal', 'post-quote', 'post-image'))) {
            ?>
                                <div class="social">
                                    <ul>
                                        <?php 
            foreach (incir_social_share() as $row) {
                ?>
                                            <li><?php 
                echo $row;
                ?>
</li>
                                        <?php 
            }
            ?>
                                    </ul>
                                </div>
예제 #3
0
<?php

require '../../../../wp-blog-header.php';
if (!current_user_can('edit_themes') || !isset($_POST['title'])) {
    wp_send_json_error();
}
$title = (string) $_POST['title'];
$args = array('post_title_like' => $title, 'posts_per_page' => 5);
if (isset($_POST['not_in']) && !empty($_POST['not_in'])) {
    $not_in = (string) $_POST['not_in'];
    $not_in = explode(',', $not_in);
    if (!empty($not_in)) {
        $args['post__not_in'] = $not_in;
    }
}
$result = new WP_Query($args);
while ($result->have_posts()) {
    $result->the_post();
    $json[get_the_ID()] = array('id' => get_the_ID(), 'post_format' => incir_post_format(get_the_ID()), 'post_title' => get_the_title());
}
if (!isset($json)) {
    wp_send_json_error();
}
wp_send_json_success($json);
예제 #4
0
파일: page.php 프로젝트: enesgur/incir-wp
<?php

get_header();
?>
    <div class="row">
        <section class="page-page large-12 medium-12 small-12">
            <?php 
if (have_posts()) {
    while (have_posts()) {
        the_post();
        ?>
                <div class="column <?php 
        echo incir_post_format(get_the_ID());
        ?>
">
                    <article>
                        <?php 
        if (has_post_thumbnail(get_the_ID())) {
            ?>
                            <div class="thumbnails text-center ">
                                <a href="<?php 
            echo get_permalink(get_the_ID());
            ?>
"><?php 
            the_post_thumbnail(array(800, 800));
            ?>
</a>
                            </div>
                        <?php 
        }
        ?>
예제 #5
0
    protected function render_post($posts)
    {
        $args = array('post__in' => $posts);
        $query = new WP_Query($args);
        while ($query->have_posts()) {
            $query->the_post();
            ?>
            <div class="<?php 
            echo incir_post_format(get_the_ID());
            ?>
">
                <article>
                    <?php 
            if (incir_post_format(get_the_ID()) == 'post-normal') {
                ?>
                        <?php 
                if (has_post_thumbnail(get_the_ID())) {
                    ?>
                            <div class="thumbnails">
                                <a href="<?php 
                    echo get_permalink(get_the_ID());
                    ?>
"><?php 
                    the_post_thumbnail('medium');
                    ?>
</a>
                            </div>
                        <?php 
                }
                ?>
                        <div class="title">
                            <h2><a href="<?php 
                echo get_permalink(get_the_ID());
                ?>
"><?php 
                the_title();
                ?>
</a></h2>
                        </div>
                        <div class="description">
                            <?php 
                incir_the_excerpt(120);
                ?>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (incir_post_format(get_the_ID()) == 'post-quote') {
                ?>
                        <div class="quote">
                            <a href="<?php 
                echo get_permalink(get_the_ID());
                ?>
"><?php 
                the_content();
                ?>
</a>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (incir_post_format(get_the_ID()) == 'post-image') {
                ?>
                        <div class="image">
                            <a href="<?php 
                echo get_permalink(get_the_ID());
                ?>
"><?php 
                the_content();
                ?>
</a>
                            <span></span>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (incir_post_format(get_the_ID()) == 'post-video') {
                ?>
                        <div class="video">
                            <?php 
                the_content();
                ?>
                        </div>
                    <?php 
            }
            ?>
                    <?php 
            if (incir_post_format(get_the_ID()) == 'post-music') {
                ?>
                        <div class="music">
                            <?php 
                the_content();
                ?>
                        </div>
                    <?php 
            }
            ?>
                </article>
            </div>
        <?php 
        }
    }