XPressME Integration Kit

Trac

Changeset 58


Ignore:
Timestamp:
Dec 29, 2008, 4:57:43 PM (15 years ago)
Author:
toemon
Message:

「最近の記事内容ブロック」でタグリストが表示されないバグ修正

「最近の記事内容ブロック」で表示記事をtaqgで選択する機能実装 #45

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/xpress_default/blocks/recent_posts_content_block_theme.php

    r57 r58  
    1616        $call_url = $_SERVER['REQUEST_URI']; 
    1717         
     18        if(empty($tag_select)) $tag_where = ''; else $tag_where = "tag='$tag_select'&"; 
    1819         
    19          
    20         global $wpdb; 
     20        global $wpdb,$wp_query; 
    2121        $block = array(); 
    2222        $item_no = 0;    
     
    2424                $wp_query->in_the_loop = true;          //for use the_tags() in multi lopp  
    2525                if (array_search(0,$selected)===0) { 
    26                         $r = new WP_Query("showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     26                        $r = new WP_Query($tag_where ."showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    2727 
    2828                } else { 
    2929                        $cat_id = implode(',',$selected); 
    30                         $r = new WP_Query("cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
     30                        $r = new WP_Query($tag_where . "cat=$cat_id&showposts=$disp_count&what_to_show=posts&nopaging=0&post_status=publish"); 
    3131                } 
    3232                while($r->have_posts()){                         
     
    5858                         
    5959                        ob_start(); 
    60                                 the_tags(__('Tags').': ',' • ',''); 
     60                                the_tags(__('Tags:', 'kubrick') . ' ',' • ',''); 
    6161                                $tags = ob_get_contents(); 
    6262                        ob_end_clean(); 
     
    9999                        $trackback_url = trackback_url(false); 
    100100                        $post_viwes = xpress_post_views_count($post_id,'views: %d' ,false); 
    101                         if (empty($tags)) $tags = __('Not Tag'); 
     101//                      if (empty($tags)) $tags = __('Not Tag'); 
    102102 
    103103                        $row_data = array( 
Note: See TracChangeset for help on using the changeset viewer.