Friday, 20 October 2017

Insert Query In Codeigniter

Here you can check Insert Query In Codeigniter:
$data = array(
'name' = > $_POST['name'] ,
'email'= > $_POST['email'],
'pass' = > $_POST['pass'] );
$this-> db->insert('users', $data);

Saturday, 14 October 2017

How to run angularjs4 without ng serve and npm start commands?

How to run angularjs4 without ng serve and npm start commands?: Write "ng build" query in you compiler and you can dist folder into your angularjs app, then you can run your app with server easily

Sunday, 8 October 2017

Price Sort Number Value Wordpress Meta Value

/*Price Sort Number Value*/ function alter_query_so_15250127($query) {
if ( !is_admin() && $query->is_main_query() && is_archive()) {

$query->set('post_type','listings');
$query->set('meta_key', 'price_value');
$query->set('orderby', 'meta_value_num');
$query->set('order', 'DESC');

}
}
add_action('pre_get_posts','alter_query_so_15250127');

Angular2 : Create a Simple Angular2 Component

How to Create a Simple Angular2 Component and here is that command:
ng generate component test-component --inline-template

Tuesday, 12 September 2017

Add multiple categories to body class Wordpress

SOLUTION
You can add this code to your custom functions.php file:
function add_categories( $classes = '' ) {

    $categories = get_the_category();
    foreach( $categories as $category ) {
    $classes[] = 'category-'.$category->slug;


}
 return $classes;
}
add_filter( 'body_class', 'add_categories' );

Google Map Filter Api Example

Here is Google Map Filter Api Example: