Integrating XenForo and WordPress requires more than just a means to create a XenForo thread from a WordPress post, it requires easier maintenance too. The following code will help an administrator see the thread tied to a WordPress post.
Add the following WordPress actions to the theme's function.php file:
Add the following WordPress actions to the theme's function.php file:
PHP:
add_filter( 'manage_posts_columns', 'add_thread_id' );
function add_thread_id($columns) {
$columns['threads'] = 'Threads';
return $columns;
}
add_action( 'manage_posts_custom_column', 'xf_show_columns' );
function xf_show_columns($name) {
global $XF, $post;
switch ($name) {
case 'threads' :
$threads = $XF->getThreadIdForPost($post_id);
echo $threads;
}
}