spanner
Member
Posted 16 years ago #
I have read the WP forum posts and other articles on embedding bits of WP content into non-WP pages. Do the same techniques work for WPMU? I can only make it work when the container page is in the same directory as the root of the WPMU installation. Anywhere else, and I get redirected to wp-signup and invited to create another blog.
Here is the code I'm using:
<?php
define('WP_USE_THEMES', false);
require('/path/to/wp-blog-header.php');
?>
and then
<ul id="posts">
<?php
$my_query = new WP_Query('showposts=3');
while ($my_query->have_posts()) {
$my_query->the_post();?>
<li><a>"><?=the_title(); ?></a></li>
<?php } ?>
spanner
Member
Posted 16 years ago #
Sorry, the second code snip got partly eaten, perhaps because of the a href tag in it. But I think the issue is with the call to wp-blog-header anyway.
use iframe - it is ugly but works =)
spanner
Member
Posted 16 years ago #
Update: The embedding techniques that work for WP definitely do not work for WPMU. I am using RSS to pipe WPMU content into non-WPMU pages instead. There's a PHP script you can use to parse the feeds:
http://www.feedforall.com/free-php-script.htm
Let's try this again. Please place any code within backticks. That's the key above the tab and to the left of the '1' key.
I've encountered this, too, spanner. Tried making a non-WPMU page with a .htaccess RewriteRule giving it a subdirectory, but even with [L] on the end of the RewriteRule the WordPress rewrites still seemed to take precedence.
That means those of us on subdirectories can't have domain.com/support or something - we have to have domain.com/blog/support - as domain.com/support gets redirected to wp-signup.