<div class="sidebar-wrap-all right">
  <div class="sidebar-newsletter">        
      <?php    /* Widgetized sidebar */ if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar(1) ) : ?>    
   
            <?php endif; /* End of widgetized sidebar */ ?>
</div><!-- end .block-1 -->
<br>
<a href="https://www.facebook.com/Pearl.Rongmuang" target="_blank"><img src="<?php bloginfo('template_url'); ?>/images/facebook_sideder.png" alt=""></a>
<br><br>
<?php $cat_p = get_the_category(); ?> 
<?php //echo $post->ID."<br>";
      //$category_id = get_post_meta($post->ID, 'category_id', true); ?> 
<?php //print_r($cat_p);
global $category_id;
global $post_id;
if(!$category_id){$category_id=$cat_p[0]->cat_ID;}     
//echo $category_id."aaaaaaaaaa";?>
<div class="behappy recent_post">
    <h2>RECENT POST</h2>
    <?php $args = array(
    'numberposts' => 10,
    'offset' => 0,
    'category' => $category_id,
    'orderby' => 'post_date',
    'order' => 'DESC',
    'include' => '',
    'exclude' => "$post_id",
    'meta_key' => '',
    'meta_value' =>'',
    'post_type' => 'post',
    'post_status' => 'publish',
    'suppress_filters' => true ); ?>
    <ul>
    <?php $recent_posts = wp_get_recent_posts( $args ) ?>
    <?php foreach( $recent_posts as $recent ){
        echo '<li><a href="' . get_permalink($recent["ID"]) . '" title="Look '.$recent["post_title"].'" >' .   $recent["post_title"].'</a> </li> ';
    }?>
    </ul>
</div>

<br>
<?php /*
<div class="product_re">
    <h3>PRODUCT<br>Recommendation</h3>

      <h4>Men Health</h4>
        <ul>
            <?php get_links('14', '<li>', '</li>', '', TRUE, 'url', FALSE); ?> 
        </ul>
      <h4>Women Health</h4>
        <ul>
            <?php get_links('15', '<li>', '</li>', '', TRUE, 'url', FALSE); ?> 
        </ul>
      <h4>Specific Health</h4>
        <ul>
            <?php get_links('2', '<li>', '</li>', '', TRUE, 'url', FALSE); ?> 
        </ul>
</div>
*/ ?>
</div> <!-- end .sidebar-wrap -->

