Displaying Blog Content on Home Page Outside WordPress
-
My WordPress installation is https://www.mydomain.com/blog but now I want to pull excerpts of the latest 3 blog posts onto my home page.
From my research so far there are two ways to do this.
1. Create a homepage inside using the blog page editor. This requires a single page plugin or template (done), but it also requires the execution of php in the post (to grab the relevant info from the recent blogs). Looks like this might be possible using a exec-php plugin, though I have not yet found one compatible with 2.9.* version of WordPress. An advantage of this method is that the home page would be cached using the blog and I could use WordPress plugins on like super-cache, multimedia players, etc. One disadvantage is that I would need to figure how to switch of the “Return to My Blog” entry at the top of the screen for just this page. The formatting inside the blog is also slightly different. I would then have to call the new HomePage located in the blog directory from the parent directory. Maybe there are other disadvantages that I don’t know about.
2. The other choice is include the wp header at the top of the home page, and continue editing the home page outside of WordPress. Then grab the blog content using php code as per various (though differing) examples here in the forums.
I would appreciate any guidance or suggestions from anyone who has tried either method.
- The topic ‘Displaying Blog Content on Home Page Outside WordPress’ is closed to new replies.