For the last 6 months, I received about 1600 spams which came from 500 different IPs. (To do this, run a SQL database export of your comment table, into a CVS file. You can then open it with Excel to filter out the spammer IP addresses)
One day in Google Webmasters I was getting lots of warnings about a URL blocked by robots.txt. Here is the message I get.
I found people stealing my content the other day without refering back to my blog, so i was looking for a way to force content origin information added the content when copy and paste.
Add the following snippet to end of your “single.php” file, and it will generate “Original: [your blog name] URL:[your post url]” to the content they copy. It won’t make them stop stealing your content, but it will certainly make it a bit more annoying for them.
This will not be visible on the web page at all.
I have setup multiple wordpress sites installation recently on the same domain name, and I thought it would be awesome to have these wordpress sites to share the user logins, which means users only need to register and login once on one site and it should work on all these wordpress sites.
I was looking for a way to put adsense advertisement in middle of the post. There are plugins to insert ads in the post, but I generally try to keep wordpress as plugin-free as I can, so I went for a filter function hack instead and it works great!
You need to create a image file that has a ‘.ico’ extension, dimension 16px X 16px.
You can use Photoshop for this, but I use Gimp, which is free. (note: windows Paint doesn’t support this format)
then upload it to your theme image folder.
Modify the theme name in the path to the one you are using, and copy it to the header.php file.
<link rel="shortcut icon" href="<?php echo home_url( ‘/ctt/themes/twentyeleven/images/favicon.ico’ );?>" type="image/vnd.microsoft.icon"/>
<link rel="icon" href="<?php echo home_url( ‘/ctt/themes/twentyeleven/images/favicon.ico’ );?>" type="image/x-ico"/>
To hide posts from category/categories, from showing up on your index page, is easy. You don’t need a plugin for this. Simply add one line of code on your index.php, and BAM! Work!
Go to index.php in your theme folder, find the “while” loop, where the posts are loop through and rendered on the page:
<?php while ( have_posts() ) : the_post();?>
// more codes here, skipping…
Ever wonder how to get rid of the wordpress logo on your login page and use your own? It’s easy, just paste this into your functions.php file
This is the code to generate the login/logout/register hyperlink.
You can put it wherever you want on your page.