How can add the Payal donate form on your site: PHP

Hello friends!. If you want to add the donate form on your website then just used code given below: <form name=”_donations” action=”https://www.paypal.com/cgi-bin/webscr” method=”post”>         <div><div>First Name: <font color=”red”>*</font></div><input type=”text” name=”first_name” value=””><div></div></div>         <div><div>Last Name:<font color=”red”>*</font></div><input type=”text” name=”last_name” value=””><div></div></div>         <div><div>Phone Number:</div><input type=”text” name=”night_phone_a” value=””><div></div></div>          <div><div>Address1:<font color=”red”>*</font></div><input type=”text” name=”address1″ value=””><div></div></div>         <div><div>Address2:</div><input type=”text” name=”address2″ value=””><div></div></div> …

How sort the array on base of array key:PHP

Hello friends! Hope you doing well :) If you want to sort the array on base of array key then just follow my code given below: <?php $myarray = array( array(“name”=>”Bob”,”price”=>8,”colour”=>”red”), array(“name”=>”Greg”,”price”=>12,”colour”=>”blue”), array(“name”=>”Andy”,”price”=>5,”colour”=>”purple”)); $sortArray = array(); foreach($myarray as $person){     foreach($person as $key=>$value){         if(!isset($sortArray[$key])){             $sortArray[$key] = array();         }         $sortArray[$key][] = $value; …

How add .html in category url using hooks: WordPress

Hello Everyone, If you want to add the .html in category page url without using any plugin then just add my code in your function file https://raghunathgurjar.wordpress.com/mycategory.html function add_before_and_after_rewrite() {     add_rewrite_tag(“%cat_id%”, ‘([^/]*)’);     /*add_rewrite_tag(“%video_src%”, ‘([^/]*)’);     add_rewrite_tag(“%video_title%”, ‘([^/]*)’);*/           // Before And After    //add_rewrite_rule(‘services.html’, ‘index.php?category_name=services’, ‘top’);    //add_rewrite_rule(‘services.html’, ‘index.php??cat=8’, ‘top’);    …

How update the quantity value in cart as per textbox value – wp e-commerce plugin:Worpress

Hello Friends! If you are using the wp e-commerce plugin and want to change the “Cart Quantity” value as per you entered the value during “Add To Cart” then don’t worry, just follow my steps. Firstly you have need to find out “cart.class” files in your plugin folders After that open this file in your …

How add any custom text as Suffix OR Prefix in post url: WordPress

Hello Friends! :) If you want to add any text in Post URL (suffix/prefix) then just use my code function save_url_suffix($post_id) { global $meta_box; // check autosave if (defined(‘DOING_AUTOSAVE’) && DOING_AUTOSAVE) { return $post_id; } // check permissions if (‘page’ == $_POST[‘post_type’]) { if (!current_user_can(‘edit_page’, $post_id)) { return $post_id; } } elseif (!current_user_can(‘edit_post’, $post_id)) { …

How get the categories title of any post using custom query: WordPress

Hello Friends! If you want to get the posts category title on your custom template, then don’t worry :) just use my code given below : $post_categories = wp_get_post_categories(‘INSERT_POST_ID_HERE’); $cats = array(); foreach($post_categories as $c){ $cat = get_category( $c ); $cats[] = array( ‘name’ => $cat->name, ‘slug’ => $cat->slug ); } foreach($cats as $index=>$val){ echo …

How display children categories for a specific parent category : WordPress

Hello friends, If you want to get the details of children categories for a specific parent category then use my code give below: $args = array(   ‘orderby’ => ‘name’,   ‘parent’ => ENTER_PARENT_CAT_ID_HERE,   ‘taxonomy’ => ‘category’,   ‘hide_empty’ => 1 ,   ‘number’ => ‘1’   ); $categories = get_categories( $args ); $content=”; …