Category Specific Single Post Templates

Sometimes we may required different category related single post template , i get the following things .
First put the code in function.php

// set up category specific single.php templates
add_filter('single_template', create_function('$t', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) return TEMPLATEPATH . "/single-{$cat->slug}.php"; } return $t;' ));

Then create file as single-categoryname.php. Now the custom template will load while loading the page related to the categoryname.

“Error 404 Not Found” in Magento Admin Login Page

I got “Error: 404 Not Found” when  transfered my magento installation from one local machine server to another. Now, I cannot login to admin panel and I got “Error: 404 Not Found”

The reason for this error is that store_id and website_id for admin should be set to 0 (zero). But, when you import database to new server, somehow these values are not set to 0.
Open PhpMyAdmin and run the following query in your database:-

SET FOREIGN_KEY_CHECKS=0;
UPDATE `core_store` SET store_id = 0 WHERE code='admin';
UPDATE `core_store_group` SET group_id = 0 WHERE name='Default';
UPDATE `core_website` SET website_id = 0 WHERE code='admin';
UPDATE `customer_group` SET customer_group_id = 0 WHERE customer_group_code='NOT LOGGED IN';
SET FOREIGN_KEY_CHECKS=1;
Source : http://stackoverflow.com/questions/5178066/error-404-not-found-in-magento-admin-login-page 

Magento no input file specified error in Godaddy Hosting

A common error, which usually comes up if you’re hosted by GoDaddy, is the no input file specified error.
Try this first:
add this to your .htaccess file

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-f
RewriteRule ^.+.php$ /bogusfile

Then try to reload your setup page.
If you do not have Magento setup in the root of your server, make sure to add the following to your .htaccess file.

RewriteBase /yourbasepath/

Once that is verified, there are a couple things you can do to fix this, but we’ll start with the one that usually works.
In your web root directory, there should be a file called php.ini. Rename this to php5.ini.
If there is no php5.ini file. Create the file and upload it to your root directory.
If that doesn’t work, add the following to the end of your newly renamed php5.ini file:

cgi.fix_pathinfo = 1

And if you’re still getting the error, add the following to the top of your .htaccess file:

Options -MultiViews

The first one usually does the trick. If you don’t see this file in there, then create a blank php5.ini file add add the line listed on the second suggestion.
If all of the above has not worked, KEEP your changes, wait exactly 24 hours. Go back to youraddress.tld/downloader and try again. You may just be cached and for some reason it takes a bit longer then I was used to. Keep your chin up!
If nothing above worked, call GoDaddy up and have them either rename this for you, or make sure you’re on PHP 5.

Source : http://www.magentocommerce.com/wiki/groups/227/error/no_input_file_specified