Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I want to display the "latest x posts", like you see per default on the index-page, but on a completely different site. E.g. /blog/

Installing WP into the directory /blog/ is not an option, as the other pages will be managed with WP.

Currently I'm using the NuRelm Get Posts plugin to get the content of the latest 10 posts, but the styling is really hard to recreate with it.

So, is there any simple solution to use the "Show latest posts" on other sites?

Edit: I'm using the twentyten theme as basis

share|improve this question
    
What is your setup exactly? Multisite? Something else? –  Rarst Feb 8 '11 at 12:13
    
Single site, but using WP as CMS. All pages made with WP-Sites, only one page (/blog)should contain the latest 10 posts –  SkaveRat Feb 8 '11 at 12:22
    
Follow the example given here: codex.wordpress.org/Pages#A_Page_of_Posts –  t31os Feb 8 '11 at 15:28
    
Or even easier, create a page and add the shortcode, see: wordpress.org/extend/plugins/nurelm-get-posts –  t31os Feb 8 '11 at 15:29
    
@t31os I'm using that plugin, as stated above. But it is not really usable at all. But your other suggestion worked! Create an answer and I'll upvote/checkmark it ;) –  SkaveRat Feb 8 '11 at 15:40

3 Answers 3

up vote 0 down vote accepted

You could insert the plugin's shortcode into another page, by following the directions here.
http://wordpress.org/extend/plugins/nurelm-get-posts/

Alternatively if you don't necessarily need the plugin and simply want to create a page that displays posts, follow the example given here on the codex.
http://codex.wordpress.org/Pages#A_Page_of_Posts

Scribu, +1 .. as that's essentially what you were suggesting to.

share|improve this answer
    
Using a modified version of "A Page of posts" in a seperate template worked as planned –  SkaveRat Feb 9 '11 at 8:04

Unless you plan to display the recent posts in an iframe, you will have to deal with the styling no matter how you get them.

My question is why can't you make /blog a page within the same WP install, but with a custom template? I.e., what kaiser said.

share|improve this answer

a) Create a template file
b) Copy the content of your index.php
c) Add the content from index.php to your new template
d) Load it up to your server
e) Create a new page and add your new template as template
f) on admin settings page choose your new page as static front page

Should work as expected.

share|improve this answer
    
Either it doesn't work, or I don't get how WP includes the files. The only thing the index.php does differently, is using get_template_part( 'loop', 'index' ); - which outputs nothing if included into a page-template. I also tried removing the 'index' - no change. Additional info: I'm using the twentyten theme as a basis – –  SkaveRat Feb 8 '11 at 15:26
    
get_template part searches for a file named "loop-index.php" then "loop.php" first in child theme, then in parent and simply includes it. Have you choosen the new page with your new template to be the static front page (settings page in admin UI)? –  kaiser Feb 8 '11 at 15:29
    
yes, static front page is chosen - But I think the loop.php from twentyten is just made for this. The solution by t31os works with some tweaks –  SkaveRat Feb 8 '11 at 15:44
    
@Rat: The loop should work anywhere else too. A loop is a loop is a loop and displays post depending on the request. @t31os: You reffering to scribu. Scribu refering to me. So, now: @Rat: I'd suggest to work with t31os suggestion ;) –  kaiser Feb 8 '11 at 16:47

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.