Attaching image to post from external url wordpress

Its very simple to attach image from any external url to post by code.
Here is the simple code that will attach image to your post.
require_once(ABSPATH . ‘wp-admin/includes/file.php’);
require_once(ABSPATH . ‘wp-admin/includes/media.php’);
require_once(ABSPATH . ‘wp-admin/includes/image.php’);
$upload = media_sideload_image(‘IMAGE_URL’, “POST_ID”, “IMAGE_DESC”);
die ( $upload );

e-Shop Recurring Payment Plugin

Hii Friends/Webmasters,
I have seen few question over web “Can eShop handle Recurring Billing through PayPal?”. Yes ofcourse it can handle here is the solution in face of plugin
As i am big fan of bloging sites, i have read lots of things regarding eshop. I have seen developers/webmasters love the eshop plugin.
Here i again [...]

CakePHP Online Now With User History Traker

Its very simple to have a online block on your webpage in CakePHP.
Here I am going to explain you Step By Step Tutorial for this. I have just developed it so want to share with Everyone because i have done research on google from long hours.

Step 1 :Hit The Controller first.
Create a function in your [...]

Paypal Pro API Plugin for eShop

I have got lots of request for integration of eshop with paypal pro API..
Clients are asking for same solution but their wording are different….
I would like someone to modify the php for eshop’s paypal gateway so that customers do not leave my site when checking out.
I need a Paypal Pro merchant gateway plugin for eShop. [...]

Custom error pages with htaccess

A tutorial to enable custom error pages with an htaccess file. Note htaccess files only work on a linux server
To create an htaccess file open notepad or any plain text editor and save the file as .htaccess, if using notepad make sure the file type is set to all files or you will create a [...]

WordPress Multisite

Create A Network
In WordPress 3.0, you now have the ability to create a network of sites (Multisite). This Article is instructions for creating a network. It is very similar to creating your own personal version of
NOTE: If you are currently running a version of WordPress MU, you do not need to complete these steps. [...]

Custom Account/Registration Fields

Our goal was to add a few fields to the standard Magento Registration form (Magento 1.4x, using the default template structure), enabling us to capture information such as Occupation, and Education.
Magento provides a simple user account signup page. However, some online stores might want to collect relevant customer information for more targeted and personal interactions [...]

WordPress Hack – How to Insert Ads in the Middle of Your Content!

With this hack you will be able to add adsense block (or somethings else) in the midde of your post after 2 paragraphs.
As a hard hack my suggestion is make a template backup before apply this tricks.

Open your “single.php” file (in your template folder)
<?php the_content(); ?>

Replace with:
$content = apply_filters(‘the_content’, $post->post_content); //get the [...]

How to display post count from a category

I am just recording my work right now. I found this to work really well.

function wt_get_category_count($input = ”) {
global $wpdb;
if($input == ”)
$category = get_the_category();
return $category[0]->category_count;
$SQL = “SELECT $wpdb->term_taxonomy.count FROM $wpdb->terms, $wpdb->term_taxonomy WHERE $wpdb->terms.term_id=$wpdb->term_taxonomy.term_id AND $wpdb->term_taxonomy.term_id=$input”;
return $wpdb->get_var($SQL);
$SQL = “SELECT $wpdb->term_taxonomy.count FROM $wpdb->terms, $wpdb->term_taxonomy WHERE $wpdb->terms.term_id=$wpdb->term_taxonomy.term_id AND $wpdb->terms.slug=’$input’”;
return $wpdb->get_var($SQL);

Place above in your function.php file.
And then add below [...]

Sidebars in WordPress

Over the past few months, I’ve seen the code for hundreds of WordPress themes. I’ve seen some beautiful code and some downright nasty code. One thing that I’ve seen more often than not is the same few lines for handling sidebars. This is code from 2007 and most likely copy-pasted from older [...]

Hire Me
Follow Me!
Most Popular Articles & Pages
Because your vote is Important
Sorry, there are no polls available at the moment.