The Santino

hCard
photo

Readers via RSS

Calendar

January: 2012
The M M G V S D
"November
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31

Service

Archives

Categories

Create a reference to articles related to WordPress

By reading many articles on the internet, I happen to notice more and more often a convenient box that refers to items with similar content.

For there is a nice plugin called WordPress Related Entries that allows us to display items with similar content to that printed on the screen.

The plugin is based on its own SQL tables and displays articles using the related_posts (), which by default returns a set of links defined by <li> (as is normal in WordPress). What it is ¬ · Then, the function is suitable to be called to 'inside of our sidebar.

Since I decided to use this function to display the related articles to each blog entry, I added a few lines of code to 'template index.

The code checks that the page displayed is the home and that even this is a static page, then prints out the links to 'inside of a div similar to that used for the meta.

Here's the code:
<?php if ( !is_home() && !is_page() ) {
echo "<div class='meta'>";
echo 'Potresti trovare interessanti anche gli articoli:<b><ul>';
related_posts();
echo '</b></ul></div>'; } ?>

Personally I put the code in the area immediately below the half of the articles.


Tags:

2 comments to create a reference to articles related to WordPress

  • KB

    Hello, I'm wondering if you can help me modify this theme (I am using it on my site Also) to work with fAlbum. I can not get the galleries to display Correctly. Any Help Would Be Appreciated. Thank you!
    Krissi

  • Hi KB, what's the problem with FAlbum? You can contact me here .

Leave a Reply

You can use HTML tags These

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>