Beispiel #1
0
    /**
     * get the archive permalink
     *
     *
     * @since Product Express 1.0
     */
    function project_express_get_the_archive_permalink(){
        global $arr_date;
        $arr_date_var = $arr_date;
        if(is_single()){
            return get_the_permalink();
        }
        if(is_archive()){
            $arr_date_var = date_parse(get_query_var( 'year', '' ).'-'.get_query_var( 'monthnum', '' ).'-'.get_query_var( 'day', '' ));

        }
        return product_express_get_daily_url($arr_date_var);
    }
Beispiel #2
0
<?php

if (is_archive() && is_day()) {
    //일별로 보여주고 전날/다음날 버튼 출력
    $arr_date = date_parse(get_query_var('year', '') . '-' . get_query_var('monthnum', '') . '-' . get_query_var('day', ''));
    $date_query = array(array('year' => $arr_date['year'], 'month' => $arr_date['month'], 'day' => $arr_date['day']));
    $blog_posts = new WP_Query($date_query);
    add_filter('get_the_archive_title', 'project_express_archive_title');
    $daily_url = product_express_get_daily_url($arr_date);
    global $wp_query;
    global $product_count;
    global $product_title;
    if (have_posts()) {
        $articles = array();
        $product = array();
        while (have_posts()) {
            the_post();
            $categories = get_the_category(get_the_ID());
            if ($categories[0]->slug == "article") {
                $articles[] = get_post();
            } else {
                $product[] = get_post();
            }
        }
        $product_count = count($product);
        if (count($articles) > 0) {
            $product_title = get_the_title($articles[0]->ID);
        }
        if ($product_count > 0) {
            $product_title = get_the_title($product[0]->ID);
        }