in Blogging

WordPress plugin: Related Post with Thumbnail

related post with thumbnail

 Related Post with Thumbnail is a new WordPress plugin that returns a list of the related entries based on active/passive keyword matches and show the first available image. It can generate a custom sized thumbnail. Based on an original plugin of Alexander Malov & Mike Lu (v. 2.02)


Download the Related Post with Thumbnail wordpress plugin from the ufficial wordpress repository.


1) Download the .zip file and extract it
2) Upload the extrated folder (related-post-thumbnail/) to the WordPress plugins folder (wp-content/plugins/)
3) Activate the plugin from the WordPress back office panel
4) Run the SQL script from the plugin option menu
5) Customize the plugin in the option menu


The syntax is:

related_posts($limit='', $len='', $before_title = '', $after_title = '', $before_post = '', $after_post = '', $show_pass_post = '', $show_excerpt = '')


1) limit: how many related post to show
2) len: how many word have the excerpt
3) before_title, after_title, before_post, after_post: too simple to comment 😉
4) show_pass_post: show the password protected post
5) show_excerpt: show the post excerpt


You can see a live demo directly on this page. Just look on the left sidebar.

Scrivi un commento


Ricevi un avviso se ci sono nuovi commenti. Oppure iscriviti senza commentare.

60 Commenti

  1. Well it seems non of the queries, or questions in this discussion has been ever answered.
    but still posting one question with a hope for answer.

    i followed all the steps appeared in the admin plug in page.
    but i am stuck with this , please tell me where in the template(exact file and location) it has to be inserted?
    5.Insert this line into your template:

    rest every thing i have performed properly but still no result.

    • Hi Frank,
      you have to insert the code lines where you want to see the thumbnail.

      Probably my plugin could be obsolete with WP 3 because of the thumbnails function are now native in wordpress.

  2. @ MICK
    I have a related posts (only headlines) and works, but this yours related posts version not works anything, including headilines.

    This version of download is same version that you use now?


  3. Look at all these people having problems and not a single repsonse from you great support …NOT

    Be great if you would tell us how to fix this…

    wp-content/plugins/related-post-thumbnail/class.ImageToolbox.php on line 898

  4. “Not Found
    The requested URL /portal/wp-content/plugins/related-posts.php was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    How can i get it???


  5. Any solution for this one:

    Fatal error: Image: Outputwidth and -height must be integers greater zero. in /home/ on line 89

    My WordPress is up2date 🙁

  6. Sorry, i have the next error when run the plugin.

    Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/wp-content/uploads/2009/06/mueck1.jpg) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/”user”/public_html/wp-content/plugins/related-post-thumbnail/related-post-thumbnail.php on line 134

    I run the SQL script and the program say : Congratulations! Full text index was created successfully!

    Some idea?


  7. Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/local/apache/htdocs/wp-content/uploads/2009/06/mueck1.jpg) is not within the allowed path(s): (/home/:/usr/lib/php:/tmp) in /home/”user”/public_html/wp-content/plugins/related-post-thumbnail/related-post-thumbnail.php on line 134

  8. Get the Fatal error: Image: Outputwidth and-height must be integers greater zero. in / public_html / wp-content / plugins / related-post-thumbnail / class.ImageToolbox.php on line 898
    WordPress v.2.8.2.
    Help with this problem, plz.

  9. Hi, can you help me?

    The plugin dont work, wordpress say that “The plugin does not have a valid header.” I have the lastes version of wordpress 2.8.2 Thanks.

  10. I get this error when i run the script:

    “Warning: require_once(C:\wamp\www\wordpress\wp-content\plugins\related-post-with-thumbnail\related-post-thumbnail/../../../wp-config.php) [function.require-once]: failed to open stream: No such file or directory in C:\wamp\www\wordpress\wp-content\plugins\related-post-with-thumbnail\related-post-thumbnail\related-post-thumbnail.php on line 35

    Fatal error: require_once() [function.require]: Failed opening required ‘C:\wamp\www\wordpress\wp-content\plugins\related-post-with-thumbnail\related-post-thumbnail/../../../wp-config.php’ (include_path=’.;C:\php5\pear’) in C:\wamp\www\wordpress\wp-content\plugins\related-post-with-thumbnail\related-post-thumbnail\related-post-thumbnail.php on line 35”

    Any help would be much appreciated! I am using the lastest version of wordpress and building a theme for wordpress on my local server.

    I have done all the instructions ask but i am still getting the problem.

  11. Ciao ho provato il plugin ma quando lo attivo mi appare una pagina bianca.
    Uso WordPress 2.8 e ho visto che anche tu lo usi. Come mai a te funzionaaa ?

    Aiutami ti prego questo plugin mi serve 🙁

    • Probabilmente non è più compatibile. A breve pubblicherò un articolo che spiega come fare il “related post” che è implementato su Dynamick.

  12. avete tutti i programmi per aggiornare questo plugin alla versione 2.7?

    you have any plans to upgrade this plugin to version 2.7?

    tienes pensado actualizar este plugin a la version 2.7?

  13. Hi,
    i’m trying to install this wonderfull plugin with WP 2.7.1
    but i have the same trouble with laurence.
    When i trying to run the SQL script, it’s doesn’t work : Error 404
    Please show me how i can resolve this trouble !
    In English, please. I can’t understand what u are writting above 🙁

  14. hello,

    try to install with WP.2.7
    doesn’ t work.
    can you explainsql index table setup please ?
    i try to open script : error 404

    nothin in the read me to make one manually.

  15. Ciao. Ho appena scaricato il tuo utilissimo plugin.

    Ho controllato nel codice e ho visto che nella funzione related_posts() c’è la variabile $output che viene chiamata 2 volte: la prima per inizializzarla (fuori dal foreach) e la seconda per aggiungere in coda ” (all’interno del foreach).

    Il risultato è che non stampa un bel niente, oltre a una lista di “palline” dei tag “li”. 🙂

    Sto provvedendo a correggere. Quando avrò finito ti avvertirò.

    Un’altra cosa…

    Poichè utilizzi un indice FULLINDEX dovresti avvertire che è necessario convertire la tabella “wp_posts” in “MyISAM” perchè è l’unico tipo di tabella che lo supporta.
    Io ho convertito la mia “wp_posts” da Innodb a MyISAM e per adesso non ho riscontrato cambiamenti. Se succederà qualcosa ti avvertirò anche di questo.

    Grazie per il tuo lavoro.

  16. Con WP 2.6.5 mi da questo errore:

    Fatal error: Image: Outputwidth and -height must be integers greater zero. in /web/htdocs/ on line 898

    C’è soluzione?

  17. Mick, can you help me to find code to call image that attached with related post in your plugin?
    reply here or in my email, thanks..

  18. Ciao, ho installato il plugin, ma quando clicco su “this script” mi esce una nuova paginqa con:

    “Not Found
    The requested URL /wp-content/plugins/related-posts.php was not found on this server.


    Apache/2.0.51 (Fedora) Server at Port 80”

    Come faccio a risolvere questo problema?

  19. Hi, this plugin looks awesome, but i haven’t been able to try it out on wp 2.5. Are you planning on a new version for 2.5 ? Thanks, and keep up the good work!

  20. Ciao dynamick, c’è un errore nel plugin, almeno l’ho scaricato e quando si esegue lo script dal pannello lancia
    il plugin sta tutto dentro la cartella related-post-thumbnail quindi penso il link dovrebbe essere
    e comunque il file si chiama related-post-thumbnail.php
    ho provato a lanciare a mano
    in questo modo ci prova ma mi restituisce errore
    Sorry, you must be at least a level 8 user.
    sebbene sia loggato come admin.

  21. Stò rifacendo la grafica per la nuova versione del sito, ma il tuo plugin con 2.5 sembra non generare nessun output, qualche idea? Grazie.

  22. when I go Run the SQL script from the plugin option menu, appears this message :

    The requested URL was not found on this server.

    My wordpres is 2.3.3 version

    how to create it manually. I don’t see in the readme file. please HELP

  23. Hi, It’s wonderful plug-in.
    but I have problem.
    run sql script -> just fatal error. like this
    Fatal error: Call to undefined function: add_action() in /home/goodmanner/public_html/blog/wp-content/plugins/related-posts.php on line 290

    how can I fix it? or how can I make index table manualy?

  24. Sorry for asking so many questions, so let me just consolidate everything.

    Is it possible manually select post related? And how do you install the script on localhost, the scripts keeps saying that it can’t be found.

  25. Something weird happened where the images just stop showing up, no errors no nothing, I can’t even trace my steps backwards to think what I did wrong…

  26. Hi, I can’t seem to get the SQL part. It asks me for “related-posts.php” and I don’t have it (downloaded from your website). So what could be the problem?

  27. @Ruud: It seems to be an apache misconfiguration problem.
    @ Loop: You can find the setup query, opening the related-post-thumbnail.php file. Look at line 47.
    @Paul: Related post with thumbnail works only with local images.

  28. Hey! Great plugin! I managed to get it work, but I am having photos from flickr in my posts, and it doesn’t work, would there be any wy to get it to work? Thanks a lot!

  29. ciao , io non riesco ad’eseguire la query di installazione e non trovo nel readme la spiegazione per poterla eseguire manualmente. Uso wp 2.3.1

  30. Don’t upload
    ‘Respuesta: 150 Opening ASCII mode data connection for class.ImageToolbox.php
    Error: Conexión superó el tiempo de espera’

    it seems that this files ImageToolbox.php had the problem