Hmm, not necessarily and not really recommended.To achieve that look you'd need to wrap Xenforo in a Wordpress iframe.
Hmm, not necessarily and not really recommended.
The most integrated way of doing it would be to update the XenForo header and footer templates and CSS to match the same HTML and CSS as used in the Wordpress theme. Or, indeed, update the WordPress theme to look like XenForo.
Here's a site that does it very seamlessly:
http://www.crazyengineers.com/
Front page is WordPress. The "Community" section is XenForo.
No iframe in sight
<?php
include ("http://www.website.com/wp-load.php");
(call to Wordpress header)
(CSS overrides file)
(a wordpress theme template including the modified XF PAGE_CONTAINER code)
(call to Wordpress footer)
?>
So my question, is there a way to execute PHP direct from the PAGE_CONTAINER template, and if so, would it not be possible to run some PHP code like this to correctly execute Wordpress whilst also executing XF:
iframe should NEVER be the answer to any question on this forum or any website really.iframe is the easiest way.
Hey lph,
thanks for the reply! So just to clarify, it is possible to include PHP code and wordpress calls from within the header template of XF?
Thanks,
Paul
<fieldset id="header_bar">
<div class="pageWidth">
<div class="pageContent">
<?php
if ( is_user_logged_in() ) {
global $current_user, $XF;
get_currentuserinfo();
echo '
<span id="member" class="loggedIn_menu_class"><a href="/community/conversations/">Inbox</a>
<a href="/community/logout">Log Out</a></span>
';
echo '
<span id="member" class="loggedIn_menu_class">
<a href="/community/members/'. strtolower($XF->visitor->get('username')) . '.' . $XF->visitor->get('user_id') .'">'.$current_user->display_name.'</a></span>
';
if ( $site_admins = array ( 'insert in the names of admin' ) ){
echo '
<span id="member" class="admin"><a href="/wp-admin">WordPress Admin Panel</a>
<a href="/wp-admin/post-new.php">WordPress Add New Blog Post</a>
<a href="/community/admin.php">XenForo Admin Panel</a></span>
';
}
} else {
echo '
<script>XenForo.LoginBar = function(a){};</script>
';
if ($_SERVER['HTTP_HOST'] == 'tuxnotes.tuxreportsnetwork.com') {
echo '<span id="member" class="logIn_menu_class"><a href="http://www.tuxreportsnetwork.com/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>';
} else {
echo '<span id="member" class="logIn_menu_class"><a href="/community/login" class="OverlayTrigger inner">Log In or Sign Up</a></span>
';
} } ?>
</div>
</div>
</fieldset>
We use essential cookies to make this site work, and optional cookies to enhance your experience.