Introduction

HOME > Introduction




Previous



Next

    */ ?>

5, ‘offset’=> 0, ‘category’ => array(3,4,5,6,7),’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
$myposts = get_posts( $args );
}
else
{
$querystr=””;
$querystr .= “SELECT * FROM $wpdb->posts
LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
WHERE ($wpdb->terms.name = ‘Advertisements’ OR $wpdb->terms.name = ‘Orders’ OR $wpdb->terms.name = ‘Tenders’ OR $wpdb->terms.name = ‘Guidelines’ OR $wpdb->terms.name = ‘New Releases’) AND $wpdb->term_taxonomy.taxonomy = ‘category’
AND $wpdb->posts.post_status = ‘publish’
AND $wpdb->posts.post_type = ‘post’
AND $wpdb->postmeta.meta_key = ‘title_in_hindi’
AND $wpdb->postmeta.meta_value != ”
ORDER BY $wpdb->posts.post_date DESC
LIMIT 5″;
//echo $querystr; die;
$myposts = $wpdb->get_results($querystr, OBJECT);
}
?>

  • Internship in MoEF&CC

    5, ‘offset’=> 0, ‘category’ => 6,’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
    $myposts = get_posts( $args );
    }
    else
    {
    $querystr=””;
    $querystr .= “SELECT * FROM $wpdb->posts
    LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
    LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
    LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
    LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
    WHERE $wpdb->terms.name = ‘Advertisements’ AND $wpdb->term_taxonomy.taxonomy = ‘category’
    AND $wpdb->posts.post_status = ‘publish’
    AND $wpdb->posts.post_type = ‘post’
    AND $wpdb->postmeta.meta_key = ‘title_in_hindi’
    AND $wpdb->postmeta.meta_value != ”
    ORDER BY $wpdb->posts.post_date DESC
    LIMIT 5″;
    $myposts = $wpdb->get_results($querystr, OBJECT);
    }
    ?>

      • 5, ‘offset’=> 0, ‘category’ => 10,’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
        $myposts = get_posts( $args );
        }
        else
        {
        $querystr=””;
        $querystr .= “SELECT * FROM $wpdb->posts
        LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
        LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
        LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
        LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
        WHERE $wpdb->terms.name = ‘Events’ AND $wpdb->term_taxonomy.taxonomy = ‘category’
        AND $wpdb->posts.post_status = ‘publish’
        AND $wpdb->posts.post_type = ‘post’
        AND $wpdb->postmeta.meta_key = ‘titile_in_hindi’
        AND $wpdb->postmeta.meta_value != ”
        ORDER BY $wpdb->posts.post_date DESC
        LIMIT 5″;
        //echo $querystr; die;
        $myposts = $wpdb->get_results($querystr, OBJECT);
        }
        foreach ( $myposts as $post ) : setup_postdata( $post );
        ?>

      • 5, ‘offset’=> 0, ‘category’ => 5,’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
        $myposts = get_posts( $args );
        }
        else
        {
        $querystr=””;
        $querystr .= “SELECT * FROM $wpdb->posts
        LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
        LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
        LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
        LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
        WHERE $wpdb->terms.name = ‘Guidelines’ AND $wpdb->term_taxonomy.taxonomy = ‘category’
        AND $wpdb->posts.post_status = ‘publish’
        AND $wpdb->posts.post_type = ‘post’
        AND $wpdb->postmeta.meta_key = ‘title_in_hindi’
        AND $wpdb->postmeta.meta_value != ”
        ORDER BY $wpdb->posts.post_date DESC
        LIMIT 5″;
        //echo $querystr; die;
        $myposts = $wpdb->get_results($querystr, OBJECT);
        }
        ?>

        • 5, ‘offset’=> 0, ‘category’ => 4,’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
          $myposts = get_posts( $args );
          }
          else
          {
          $querystr=””;
          $querystr .= “SELECT * FROM $wpdb->posts
          LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
          LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
          LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
          LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
          WHERE $wpdb->terms.name = ‘Orders’ AND $wpdb->term_taxonomy.taxonomy = ‘category’
          AND $wpdb->posts.post_status = ‘publish’
          AND $wpdb->posts.post_type = ‘post’
          AND $wpdb->postmeta.meta_key = ‘title_in_hindi’
          AND $wpdb->postmeta.meta_value != ”
          ORDER BY $wpdb->posts.post_date DESC
          LIMIT 5″;
          //echo $querystr; die;
          $myposts = $wpdb->get_results($querystr, OBJECT);
          }
          ?>

          • 5, ‘offset’=> 0, ‘category’ => 3,’orderby’=> ‘publish_date’,’order’=> ‘DESC’ );
            $myposts = get_posts( $args );
            }
            else
            {
            $querystr=””;
            $querystr .= “SELECT * FROM $wpdb->posts
            LEFT JOIN $wpdb->postmeta ON($wpdb->posts.ID = $wpdb->postmeta.post_id)
            LEFT JOIN $wpdb->term_relationships ON($wpdb->posts.ID = $wpdb->term_relationships.object_id)
            LEFT JOIN $wpdb->term_taxonomy ON($wpdb->term_relationships.term_taxonomy_id = $wpdb->term_taxonomy.term_taxonomy_id)
            LEFT JOIN $wpdb->terms ON($wpdb->term_taxonomy.term_id = $wpdb->terms.term_id)
            WHERE $wpdb->terms.name = ‘Tenders’ AND $wpdb->term_taxonomy.taxonomy = ‘category’
            AND $wpdb->posts.post_status = ‘publish’
            AND $wpdb->posts.post_type = ‘post’
            AND $wpdb->postmeta.meta_key = ‘title_in_hindi’
            AND $wpdb->postmeta.meta_value != ”
            ORDER BY $wpdb->posts.post_date DESC
            LIMIT 5″;
            //echo $querystr; die;
            $myposts = $wpdb->get_results($querystr, OBJECT);
            }
            ?>