This little snippet is being posted because of extreme frustration in trying to find the answer for how to close a fancybox window with a link or button. Hopefully this little tid-bit will help you out.
Sorting Product order in WP-Ecommerce with Short Code
This is a quick little snippet I am sharing because it helped me out alot and was VERY difficult to find actual documentation on it. I had been trying to sort the products on a client’s website for some time now and the built in product sorter on WP-Ecommerce was not working at all . The goal was to sort the products in alphabetical order starting from “A” and going down. For some reason the site had them in reverse alphabetical order and I do not know why. So, here is how to sort your products by using shortcode with WP-Ecommerce:
If your product shortcode looks like this: [wpsc_products category_id='2 ']
You will want to simply add this: order=’name’
So your final product would be [wpsc_products category_id='12 ' order='name']
That’s it! Should work. You may be able to use other “order” functions but I have not tried that out. Hope this helps!
I am beginning to run into more and more website hacks lately and it is really becoming quite the head ache. Lucky for me, I run weekly backups of my sites and am able to quickly and easily restore them after the hacks.
The most recent hack I have run into was rather pointless as all they did was hijack the website and display a different index.php page and change the username in my WordPress database. Here is a screen shot of what appeared on the website when I went to it:
As you can see all it does is display the text:
OpPs !! Channal One is Here !!
Saudi Arabid HaCkeR
Hacked By EjRam 7rb ~ ReD HaT TeaM
… and then a bunch of other crap here.
To remove the hack simply login to your them and delete the index.php file and replace it with a clean one. Or, if you have a backup of your whole theme folder just delete it all and replace it. You will also want to check your login name and on my site they changed it to r00t as the username and who knows what the password was.
After you clean it up change your passwords and tighten up security. There are a number of WordPress plugins that can help with security including Login Lockdown.
Basically, the moral of the story is to keep a backup of your WordPress files and database all the time. You just never know when your site might be hacked. Oh, and if you think your site won’t be hacked because you are small time, think again. The site of mine that was hacked nets less than 20 visitors a week.
Have you ever wanted to customize your WordPress admin login screen without using a plugin? Here is a very simple way to achieve this by only making changes to your functions file in your theme. By making the changes to the functions file you will avoid losing your customizations when WordPress makes its next update.
Step One: Create your WordPress login page images. If you want to replace the WordPress logo on the login screen with your own you should try and limit it in size. A good size to use to replace the WordPress logo would be about 320px X 65px.
Step two: Open up your functions.php file in your WordPress theme folder.
Step three: Insert the following snippet of code. Be sure to change where it says “your-image-here” and put the images in the themes image folder.
//Customizations For Login Screen for Admin (images must be in theme image folder)
}add_action(“login_head”, “my_login_head”);
function my_login_head() {
echo ”
<style>
body.login #login h1 a {
background: url(‘”.get_bloginfo(‘template_url’).”/images/your-image-here.png’) no-repeat scroll center top transparent;
height: 65px;
width: 320px;
}
html{background:url(‘”.get_bloginfo(‘template_url’).”/images/your-image-here.jpg’) no-repeat center #fbfbfb !important;}
</style>
“;
}
//End Customizations for Login Screen
That’s it! You should now have a customized WordPress login page!
Have you ever wanted to keep a WordPress plugin from checking for updates? If you have ever made any customizations to a WordPress plugin and have lost them when the plugin updated, then this little trick might help you out.
To keep a WordPress plugin from updating you simply change the plugins version to a higher version number. When it automatically checks for updates it will think you have the latest version and skip updates on your plugin.
To do this, Login to WordPress and go to the “Plugins” page. Find the plugin you want to prevent from updating and click on “edit” underneath it. You will see a bunch of information like below:
/*
Plugin Name: Akismet
Plugin URI: http://akismet.com/
Description: Used by millions, Akismet is quite possibly the best way in the world to <strong>protect your blog from comment and trackback spam</strong>. It keeps your site protected from spam even while you sleep. To get started: 1) Click the “Activate” link to the left of this description, 2) <a href=”http://akismet.com/get/?return=true”>Sign up for an Akismet API key</a>, and 3) Go to your <a href=”plugins.php?page=akismet-key-config”>Akismet configuration</a> page, and save your API key. Version: 2.5.3
Author: Automattic
Author URI: http://automattic.com/wordpress-plugins/
License: GPLv2 or later
*/
You are looking for the section in red that says the version number. Simply change this to something higher like “Version: 100.1″ or whatever you want it to be. Save.
That is it. Now when WordPress checks for updates for that specific plugin it will think yours is up to date and skip it!
*Note: WordPress updates are important and many of them are done for security purposes so make sure you know what you are doing before you disable updating.
This video is a quick little walk-through showing how to use the basics of WordPress to publish a simple post. Most people may already have this down but if you are new to WordPress it will help you understand a little more about how the interface works.
On a side note I mention the “SEO” section on this video and that is actually a plug in that needs to be added to WordPress for it to appear. Enjoy.