• We are available for any Development work:
  • Email us at: programmer_heart@yahoo.com

How to show Success Message as popups in Gravity Form in wordpress

To do this open your functions.php file and paste the following code:

  You can change the pop up  message style  by modifying what is inside the sw_gf_thx_msg() function.

Continue reading

How to show Validation error as popups in Gravity Form in wordpress

To do this open your functions.php file and paste the following code:

  You can change the error message by modifying what is inside the alert () function.

Continue reading

Modifying Admin Post Lists In WordPress

All we need is a definition of the labels that we’re going to use and a few settings. Open up your functions.php file and drop the following into it. [code] add_filter(‘manage_models_posts_columns’, ‘MT4_columns_models_head’); add_action(‘manage_models_posts_custom_column’, ‘MT4_columns_content’, 10, 2); // ADD TWO NEW COLUMNS function MT4_columns_models_head($defaults) { $defaults[‘first_column’]  = ‘First Name’; $defaults[‘second_column’] = ‘Phone’; $defaults[‘third_column’] = ‘Email’; return […]

Continue reading

Get all post of certain category of particular post type in wordpress

You can use following code to display all post related to certain category of any custom post type. [code] global $post; $params_mostwatched=array( ‘post_type’ => $post_type, ‘post_status’ => ‘publish’, ‘tax_query’ => array( array( ‘taxonomy’  => $post_type.’_category’, ‘field’     => ‘term_id’, ‘terms’     => $cateid )) ); $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query($params_mostwatched); while ($wp_query->have_posts()) : […]

Continue reading

How to get category from categegory id in custom Post

To get the category  from the category  id  in  custom post type is different than the normal word press . You can grab the category information from the category id by applying following code which returns array. [code] $cat=get_term_by(‘id’, $cateid,’post_type_category’); //like $cat=get_term_by(‘id’,28,’portfolio_category’); //where portfolio is post type and 28 is category id associated with that […]

Continue reading

How to Customize the fields at WooCommerce Checkout Page

Please add this code to you functions.php at currently applied theme folder. Here is the example to hide the fields from the billing and shipping section. [php]add_filter( ‘woocommerce_checkout_fields’ , ‘custom_override_checkout_fields’ ); function custom_override_checkout_fields( $fields ) { unset($fields[‘order’][‘order_comments’]); unset($fields[‘billing’][‘billing_phone’]); unset($fields[‘billing’][‘billing_country’]); unset($fields[‘billing’][‘billing_first_name’]); unset($fields[‘billing’][‘billing_last_name’]); unset($fields[‘billing’][‘billing_company’]); unset($fields[‘billing’][‘billing_address_1’]); unset($fields[‘billing’][‘billing_address_2’]); unset($fields[‘billing’][‘billing_city’]); unset($fields[‘billing’][‘billing_state’]); unset($fields[‘billing’][‘billing_postcode’]); //for shipping unset($fields[‘shipping’][‘shipping_phone’]); unset($fields[‘shipping’][‘shipping_country’]); unset($fields[‘shipping’][‘shipping_first_name’]); unset($fields[‘shipping’][‘shipping_last_name’]); unset($fields[‘shipping’][‘shipping_company’]); unset($fields[‘shipping’][‘shipping_address_1’]); […]

Continue reading

Loading Contact form JavaScript and Stylesheet Only When it is Necessary in wordpress

Step 1: Stop loading the JavaScript and CSS stylesheet on all pages When the value of [php]WPCF7_LOAD_JS[/php] is set to false (default: true), Contact Form 7 does not load the JavaScript. You can set the value of this constant in your wp-config.php like this:

  Likewise, you can control the loading of the CSS […]

Continue reading

Custom post type in the Archives widget

Add this bit of code at functions.php

   

Continue reading

Disable or Enable All WordPress Plugins via the Database

Before beginning,make a backup copy of your database. Login to your database using phpMyAdmin (or whatever), and navigate to the “active_plugins” column of the “wp_options” table using the following SQL query (edit the default WordPress table prefix “wp_” if needed):

Once the active_plugins column appears, click to edit it. You will see something similar […]

Continue reading
Press Enter to Search