This is regarding where to place the < ?php wp23_related_posts(); ?> code. I downloaded WP 2.3 Related Posts plugin by Denis, PaoPao.

This plugin is only available for WordPress 2.3 beta 1.

I’m quite a PHP dummy myself, so I’m always fiddling around with this and that and going “oops” 101 times before finally getting anywhere.

1. Activate Plugin

Once you’ve downloaded and activated the plugin (under the Plugins tab in your WordPress admin panel), you’ll have to add

< ?php wp23_related_posts(); ?>

to the template. This makes the related posts show up.

2. Where to Place Code

In my case, I added it to the Index template (the “main” template — the index.php file), and the Single Post template (for individual posts).

Get to the files by going into Presentation » Theme Editor. Please remember to store the original files somewhere ^^.

theme editor

Go to the index.php file. This is your main template.

Then, look for < ?php the_content; ?>. It is under <div class=”PostContent”>, in the current theme I’m using.

On index.php file:

index file

On single.php file:

single file

3. Configure

One more step (optional).

The plugin allows you to make some specifications. I set mine to a max of 5 related posts, and to show random posts if there are no related posts at the moment.

Go to Options » WP23 Related Posts.

config file

That’s it.

* Thanks to Hani, or I’d have sat on this for longer :P.

Random Posts