WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Getting post info in a static page (5 posts)

  1. Doodlebee
    Member
    Posted 6 years ago #

    Hey all. I've done this before, several times - but this time it's a teensy bit different, and I can't seem to figure out why it's not working. I'll try to explain everything in as much detail as I can.

    1. I have WordPress in the root. The root URl would be:
    site.com

    2. I have a redirect going on. If I leave the redirect out, the site URL is like so:
    site.com/~someurl/
    but with the redirect, it's:
    site.com/someurl.org (it's being tested right now, and will move to a new server soon). I don't know if the redirect matters, but I thought I'd mention it.

    3. I have a folder in the root, as well:
    /somefolder - later this will be a subdomain of the main site (same folder name...so it'll be somefolder.site.com)

    In this folder, I have subfolders, each of which contain index pages. Each index page is going to be a "landing" page, and is calling in content from the WordPress setup. (so, an example of how the *current* URL - on the test area - would look: site.com/someurl.org/somefolder/sub/index.php...
    where the WordPress url would be: site.com/someurl.org/)

    4. Under Settings>Reading, I have a static home page and a post page both chosen.

    Everything is being called in correctly - the theme is showing up just fine, all the images and stuff - BUT...none of the actual post content is showing up. I cannot figure out why.

    Obviously, my call to the wp-blog-header is correct, since the header, footer and sidebar are all showing up as they should. But the call to the Loop seems to be malfunctioning. I cannot figure out why. Basically, these "outside of WordPress" landing pages are all copies (basically) of the Home page. So there's a query in there to show only the most recent post in a particular category, another query to show the last 5 post links, and then the regular standard Loop - all of which I've done before many times (and is working just fine on the WP site, so I know the code is good) - but on these subfolders this stuff just isn't showing up.

    Is there some relative path that I need to insert somewhere that I'm not aware of? Like I said, the call o wp-blog-header.php *is* correct (as evidenced by everything else showing up just fine), and my code definitely works (since is *in* the WP area, and is working fine) but I'm not getting why the content isn't showing up on the site that's located outside of WordPress, within subfolders. Any ideas would be appreciated.

    Boy, I hope that wasn't too confusing - I was just trying to supply a lot of detail!

  2. Doodlebee
    Member
    Posted 6 years ago #

    Okay - I got it. Turned out I needed to use "get_posts();" instead of "new WP_query". Now it's working just fine :)

  3. Anonymous
    Unregistered
    Posted 5 years ago #

    doodlebee,
    I'm working on a site that has some similar functionality (I think) to what your post was about and I was hoping to pick your brain - or anyone else's brain that might know. I've got a "magazine" type site I'm working on through WPMU. It is currently in development but will have about 10 blogs total on the site. My home page will be static and another page will be static. I would like to have the 5 newest posts from my various blogs show up on the static pages - almost like headlines or quick peaks at the site's content.
    I'm pretty new to WordPress and php in general so I'm not exactly sure what the best way to accomplish this is. I've looked in the forums but can't find specific answers to my question. Any ideas on how I could make that work? Any help is appreciated.

  4. @mercime
    Volunteer Moderator
    Posted 5 years ago #

    There are plugins for what you're looking for at http://wpmudev.org.
    Support forum for WordPress MU is at
    http://mu.wordpress.org/forums/
    Best way to search the WPMU forum is at
    http://mu.wordpress.org/forums/search.php
    Good luck.

  5. Anonymous
    Unregistered
    Posted 5 years ago #

    thanks, i'll look around and see what i can find.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.