• 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 XF Notices to a WordPress theme

XenForo notices may be added to a WordPress child theme header file using only a few lines of code.

PHP:
/* Script to pull a notice from the XF */
/** @var $notModel XenForo_Model_Notice */
$notModel = XenForo_Model::create('XenForo_Model_Notice');
$notices = $notModel->getNoticeById(23);
echo $notices['message'];
?>

Change the number within the getNoticeById parentheses to match the XenForo notice you want to show on the WordPress side of your website.
Author
LPH
Views
527
First release
Last update
Rating
0.00 star(s) 0 ratings

More resources from LPH

Top