• Welcome to Tux Reports: Where Penguins Fly. We hope you find the topics varied, interesting, and worthy of your time. Please become a member and join in the discussions.
Resource icon

HowTo: Add XenForo Latest Resources to WordPress Theme

If you purchase the XenForo Resource Manager, then you might want to show the latest updated resources on the WordPress side of your site.

Use the following code:

PHP:
<?php
/* Script to pull the latest updated resources from the XF Resource Manager*/
 
/** @var $resModel XenResource_Model_Resource */
$resModel = XenForo_Model::create('XenResource_Model_Resource');
$fetchOptions = array(
'limit' => 5,
'order' => 'resource_date',
'direction' => 'desc'
);
 
$rmupdates = $resModel->getResources(array(), $fetchOptions);
 
foreach ($rmupdates AS $rmupdate)
{
echo ("<div class='entry-meta'><a href='/community/" . XenForo_Link::buildPublicLink('resources', $rmupdate) . "' >" . $rmupdate['title'] . "</a> Downloaded: " .$rmupdate['download_count'] . "<br /></div>"); // Echo the title with a link.
 
}
 
?>

Resource Manager on WP Side.png
Author
Albert
Views
576
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from Albert

  • Linux Mint
    Linux Mint
    From Freedom Came Elegance
  • CentOS
    CentOS
    a stable, predictable, and manageable platform based on RHEL
  • CodeRunner
    CodeRunner
    CodeRunner is the easiest way to write code on your Mac.
  • Develop PHP
    Develop PHP
    Web Development Training System
  • IceCoder
    IceCoder
    Code editor awesomeness ...online or offline
Top