Adding two different wordpress blogs to website
-
Hey!
I’m currently redevolping my website and need some help on some php I am stuck on.
So I’ll explain the situation…
I have my first blog designsplat.com which is where I feature designers and the second blog is design events. designsplat.com/events
I am currently making a new homepage for designsplat. You can see what I have so far at http://www.designsplat.com/test.php
Basically – In the two orange boxes – the one on the left I want to have the most recent post from design splat (which as you can see it is pulling in already) and in the right hand side one I want the most recent post from design events.
The code I have used for that I found on a topic on here: https://en.forums.wordpress.com/topic/rss-feedlink-from-website-to-blog?replies=11
—– The code I have used to try and achieve what I want:
<div id=”fromblog”>
<?PHP
define (‘WP_USE_THEMES’, false);
require(‘PATH TO / wp-load.php’);
query_posts (‘showposts=2’);
?><?PHP
while (have_posts()) : the_post();?>
<h2>“> <?PHP the_title(); ?></h2>
<p><?PHP the_excerpt(); ?></p>
<p>POSTED by: <?PHP the_author(); ?> on <?PHP the_time(‘jS F Y’); ?></p><?PHP endwhile; ?></div>
<div id=”fromblog2″>
<?PHP
define (‘WP_USE_THEMES’, false);
require(‘PATH TO ./events/wp-load.php’);
query_posts (‘showposts=2’);
?><?PHP
while (have_posts()) : the_post();?>
<h2>“> <?PHP the_title(); ?></h2>
<p><?PHP the_excerpt(); ?></p>
<p>POSTED by: <?PHP the_author(); ?> on <?PHP the_time(‘jS F Y’); ?></p><?PHP endwhile; ?></div>
———–
So all is well and good – the first bit pulls through the post from design splat.
But the second part…nothing happens. After being sat down for a couple of hours with my other half I now understand why…the second part of the events code is calling the functions from wp-load.php and not .events/wp-load.php even though they are both in seperate divs.
What I want to know is… Is there a simple way to resolve this as I have been sat down for a couple hours with my other half coding me up some php to do a similar job from scratch but its pulling in the photos from the posts etc.
If there is a simple way to resolve this using the code above pulling in from both wp-load.php files that would be great and would get rid of a massive headache!
Thanks in advanced
Amber
The blog I need help with is: (visible only to logged in users)
-
The blog you specified at http://www.designsplat.com does not appear to be hosted at WordPress.com.
This support forum is for blogs hosted at WordPress.com. If your question is about a self-hosted WordPress blog then you’ll find help at the WordPress.org forums.
If you don’t understand the difference between WordPress.com and WordPress.org, you may find this information helpful.
If you forgot to include a link to your blog, you can reply and include it below. It’ll help people to answer your question.
This is an automated message.
-
Unfortunately, you are posting to the wrong support forum. Please do as the support bots states and post to the correct forum for your software at http://wordpress.ORG/support
Happy blogging!
- The topic ‘Adding two different wordpress blogs to website’ is closed to new replies.