How to: Show random links in WordPress
Written by Malin on August 10th, 2007 -Quite a few people have asked me how I display my random exits in the sidebar on infektia.net. So I thought I could be be nice and explain it here.
Since I have many so called link exchanges, I decided to not show them all in my sidebar. The list would be really long. So I created an “Exit” page where all the links (from WordPress’ own blogroll that you manage in the wp admin) will be shown instead.
The coding for showing all blogroll links:
<ul>
<?php get_links(2, '<li>', '</li>', '', TRUE, 'name', FALSE); ?>
</ul>
The coding for showing random blogroll links:
This code will show five random links.
<ul>
<?php get_links(-1,'<li>', '</li>', '', false, 'rand', false, false, 5); ?>
</ul>
Learn more
If you want to customize the output more I suggest you read the Template Tags/Get Links in the WordPress codex, every bit of coding is more explained there.
Thoughts Aside
To get into the DeVry University, it is important that your 70-350 and 642-445 scores got accepted. A 220-301 as well as a 646-562 would suffice too and make sure you are not recreating the disaster 642-372.
Posted in How to | 2 Comments »
SEO: WWW or not
Written by Malin on August 8th, 2007 -
Does your domain have a higher pagerank with the www? Or is it the other way around?
That can be a problem when you/others are calculating your pagerank for either advertising purposes or if you submitted the site to a pay per post site.
In the beginning, my other site; infektia.net, had a pagerank of 5 with the www and a pagerank of 3 without the www. Therefore I decided to go with one of them, with the www of course.
Why should you choose one?
You are effectively diluting your effectiveness to the search engines if you have both since the search engines will treat both as two different sites. One called www.yourdomain.com and the other one called yourdomain.com. If you stick with one you won’t loose any traffic, ranking, “points” (lol) or statistics in the long run.
How do I fix this?
There more than one way to fix this. The first way is for more advanced users (but also more effective);
1. Add a 301-redirect to your .htaccess file
The .htaccess file is located in the root of your domain. If not you’ll have to create a text file and name it to .htaccess.
Replace my domain name with your own!
- Add this code if you want to go without the www:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^cactuus\.com [NC]
RewriteRule ^/?(.*)$ http://cactuus.com/$1 [L,R=301]
- And this code if you want to include the www:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} !^www\.cactuus\.com [NC]
RewriteRule ^/?(.*)$ http://www.cactuus.com/$1 [L,R=301]
No matter what you choose here the visitor will be redirected to the version you have chosen.
2. Google Webmaster Tools
You can get Google to do this for you by logging in to Google Webmaster Tools and specify the desired version.
3. No WWW plugin for WordPress
If you don’t want to use the www for your domain you can install the No WWW plugin for WordPress to do the job for you.
QUESTION: Did you choose one?
Posted in How to | 13 Comments »
Writing paid posts - Word count
Written by Malin on August 7th, 2007 -
When writing paid opportunities, there is always a minimum words count to follow. So I guess when you write your opportunities, you open Word or any other editor that can count your words.
But what if your text editor decides to elope? What if you need to count words right now but don’t have the time or energy to do it manually?
There is a very easy answer to those questions. You just use a simple script! You can either surf to the Cut and Past Word Count over at Javascriptkit and bookmark the site, or you can copy the script and implement it on a hidden (if you prefer it) page in your blog or on your server.
How do you count your words?
Posted in How to | 5 Comments »
Adding a signature to your blog posts
Written by Malin on July 11th, 2007 -I was admiring Lorelle’s handwritten signature she had at the end of every blog post. And one day she told the secret behind it!
So I decided to make my own since I think it gives a nice personal touch to the blog. And you know what? It actually almost looks like my real life signature!
Here is how to do it!
Surf over to MyLiveSignature and choose to create a new signature in the menu. Then choose the “signature creation wizard” and follow the simple steps to make your own. There are many fonts to choose between, 120 to be exact.
You will also be able to choose the size, color and slope. When you are done you may choose to animate the signature (costs money), to download the signature to your computer or to generate HTML or BB code to direct link your signature.
I chose to download it to my computer and then upload it to my Photobucket account.
How do I add it to my post?
You can either use this Wordpress plugin called LiveSig that adds it automatically for you (then you have to save the code that MyLiveSignature gave you when you were done). I haven’t tried this plugin because I thought it actually were easier to add it manually (easy if you know how to work with Wordpress’ coding).
You can add it manually by, after uploading your signature to your own server/Photobucket/etc, open up the theme viewer (in your WP admin panel, Presentation -> Theme Editor), choose the Main Index Template (or index.php, depends on your theme), and then add a normal img tag wherever you want your signature to appear.
I chose to do it a bit differently. I added it through pure CSS. That means that I added an element called “postfooter” and then added the signature as a background in the CSS file.
Posted in How to | 2 Comments »
How to track your Blogger statistics with Google
Written by Malin on July 9th, 2007 -A while back I wrote “How to track your Blogger statistics with Google” on infektia.net.
Google owns Blogger (Blogspot), everyone knows that. But we all Blogger bloggers miss the statistics module that for example Wordpress.com blogs already has. Since they’re in the same family I think it would be a good idea to implement Google Analytics with Blogger. But you never know, it might show in the future.
However, if you want to track your visitors on your Blogger/Blogspot without putting up a linkback-image to the tracking-service on your blog (that’s so 90’s!) then Google Analytics is the tool for you…
Go here to read it: How to track your Blogger statistics with Google.
Posted in How to | 3 Comments »