a insert query in wordpress

We can use insert query in wordpress as follows.Just take a look on query.It is quite simple as we use in php to insert data into database. <?php global $wpdb; $wpdb->prepare( “INSERT INTO `wp_submitted_form` (`name`,`email`,`phone`,`country`,`course`,`message`,`datesent`) values (‘$name’, ‘$email’, ‘$phone’, ‘$country’, ‘$course’, ‘$message’, ‘$datesent’)” ); ?> Or, use can use query in this way also <?php … Read more

How To Hide View Source In WordPress

Hello,reader if you are interested to disable right click on your website .Then, i would like to give an idea about it that You can’t do this but only thing is that you can disable right clicks. To disable right click on your website in WordPress you can use this code as shown <body oncontextmenu=”return … Read more

to Display Product specific to a category with WooCommerce Plugin

<ul class=”products”> <?php $args = array( ‘post_type’ => ‘product’, ‘posts_per_page’ => 1, ‘product_cat’ => ‘shoes’, ‘orderby’ => ‘rand’ ); $loop = new WP_Query( $args ); while ( $loop->have_posts() ) : $loop->the_post(); global $product; ?> <h2>Shoes</h2> <li class=”product”> <a href=”<?php echo get_permalink( $loop->post->ID ) ?>” title=”<?php echo esc_attr($loop->post->post_title ? $loop->post->post_title : $loop->post->ID); ?>”> <?php woocommerce_show_product_sale_flash( $post, … Read more

How to Change WP Default Sub Menu Class

WordPress sub menu has always a default class. Default class name is “sub-menu”. In this tutorial, we are going to see how to Change default sub menu class in WordPress. To change it to custom class add given below code to functions.php add it to functions.php function change_submenu_class($menu) { $menu = preg_replace(‘/ class=”sub-menu”/’,’/ class=”your menu … Read more