Title: [Plugin: phpbb_recent_topics] Code to display topic Forum
Last modified: August 19, 2016

---

# [Plugin: phpbb_recent_topics] Code to display topic Forum

 *  [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-phpbb_recent_topics-code-to-display-topic-forum/)
 * In case anyone else might find this useful, I’ve just written a tiny addition
   to this plugin to display the name of the forum that each recent topic is part
   of.
 *     ```
       // GET FORUM WHICH POST IS IN - Phil Ewels, 26/09/2010
       $sql_query = "SELECT * FROM phpbb_forums WHERE forum_id=" . $topic->forum_id. " LIMIT 1";
       	# Run Query
       	if ($prt_phpbb_dbinsecureon == "1") {
       		$forum = $phpbbdb->get_row($sql_query);
       	} else {
       		$forum = $wpdb->get_row($sql_query);
       	}
       echo "<br /><small>" . $forum->forum_name . " </small>";
       ```
   
 * This should be inserted into **display.php**, around line 175 – 185, depending
   on where you would like the text to be displayed.
 * Please note that you may need to replace **phpbb_forums** with the name of the
   phpBB forums table in your database.

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [linickx](https://wordpress.org/support/users/linickx/)
 * (@linickx)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-phpbb_recent_topics-code-to-display-topic-forum/#post-1692278)
 * Nice one!
 * If you want to [create a trac ticket](http://plugins.trac.wordpress.org/newticket?component=phpbb-recent-topics&owner=linickx)
   I’ll look to add this as a tickbox feature 🙂
 *  Thread Starter [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * (@tallphil)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-phpbb_recent_topics-code-to-display-topic-forum/#post-1692280)
 * Cool, have done – look forward to seeing it appear in a future update 😉

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘[Plugin: phpbb_recent_topics] Code to display topic Forum’ is closed 
to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/phpbb-recent-topics_867975.svg)
 * [phpbb_recent_topics](https://wordpress.org/plugins/phpbb-recent-topics/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/phpbb-recent-topics/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/phpbb-recent-topics/)
 * [Active Topics](https://wordpress.org/support/plugin/phpbb-recent-topics/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/phpbb-recent-topics/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/phpbb-recent-topics/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Phil Ewels](https://wordpress.org/support/users/tallphil/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/plugin-phpbb_recent_topics-code-to-display-topic-forum/#post-1692280)
 * Status: not a support question