Browsing all articles in Tips
Feb
29

Stop Plugin from showing updates

While developing WordPress site most of the time we use different plugin for the better support of the site.And some times we as a developer make some customization in the default plugin files for our required functionality.

The plugin files are always get updated from its developer and the updates for newer version are notified to us by the wordpress. Suppose we have make some customization in code in the original plugin’s file then that changes will be removed if we update the plugin file to newer version.So to solve this problem we have to stop the automatic update option of the plugin or update notification of the plugin.

To do this we can have two Methods.
That are,

Method 1:

just add below code to the function.php file of your current theme ,

# 3.0:
remove_action( 'load-update-core.php', 'wp_update_plugins' );
add_filter( 'pre_site_transient_update_plugins', create_function( '$a', "return null;" ) );

if you are using wordpress 3.0 or higher version.
read more

Feb
28

How to resolve jquery conflict?

Many a times in the project we have to use jQuery code.And some times this jQuery code gets conflict with some other jQuery code.So to solve that issue i have some solution which will help you to getout from the jQuery conflict issue so that you can get back to your work.

When you are using multiple jQuery files you may lead to the conflict amoung them.Because most of the time jQuery file use “$” in the file as the jQuery reference variable throw out the code.And because of this “$” variable jQuery files get conflict with each other.

To resolve the jQuery conflict issue you can use any of the below option,

Option 1:

When you put jQuery into no-conflict mode, you have the option of assigning a variable name to replace $. ( only once )

<script src="prototype.js"></script>
<script src="jquery.js"></script>
<script>var $j = jQuery.noConflict();</script>

read more

Oct
18

Insert update and delete in WordPress.

In the core php, we need to write at-least 10 to 15 lines, sometimes more than that for the database connection and insert update or delete operations on the database..

But in the wordpress we just need a single line for the opration and no need to connect to database. Because this steps are done at the installation only.

INSERT QUERY :

$wpdb->insert( $table, $data, $format );

table (string):

The name of the table.

data (array):

Data to insert in column => value pairs.

format (array|string) : (optional)

An array of formats to be mapped to each of the value in $data. If string, that format will be used for all of the values in $data. If omitted, all values in $data will be treated as strings unless otherwise specified in wpdb::$field_types.

read more

Oct
10

How to convert SQL to Excel in Php?

Author Arpi    Category PHP, Tips     Tags

Many a times while developing a project we want to send the query data to the user or we want to have the query data for any other reason like analysis or report etc.

So to convert the SQL query data into the excel sheet form is many a times useful for developers.

You can do it using following code,

<?      $sql = "select * from wp_db";
	$result = mysql_query($sql);
	$arr_data = array();

	while($data = mysql_fetch_assoc($result)){
                   $arr_data[] = $data;
		}

read more

Oct
1

How to configure mail from localhost ( wamp ) using PHP?

Author Arpi    Category PHP, Tips     Tags ,

I have searched a lot when I was required to configure mail using my localhost for my project. At many sites I have read that it’s just not possible to send mail using localhost. You have to upload your project on the net.

But after searching a lot I get to know that it’s possible to send mail using localhost without uploading the project.  And today I post this blog so that the PHP programmer can get to know that it’s not that we just cannot send mail from localhost .We can do.

Steps to send mail from localhost:

read more

Follow us on Twitter! Follow us on Twitter!

Search in this website

our sponsors

latest comments

Find us on Facebook

Top Authors

36 posts
saurabh
22 posts
10 posts

Find us on stackoverflow

Polls

Tell us who you are

View Results

Loading ... Loading ...

My Bookmarks

Sponsers Link