WordPress.org

Ready to get started?Download WordPress

Forums

Display excerpt on homepage when the blog is in a subdirectory (14 posts)

  1. nohea
    Member
    Posted 7 years ago #

    Would it be feasible to install WP at the root directory, have the blog sit in a subdirectory of it, say, http://unjour.ch/news/, but have always an excerpt of the latest post be automatically displayed on the homepage (http://unjour.ch)when updating the blog even though it is nestled inside a subdirectory ?

  2. Austin Matzko
    Member
    Posted 7 years ago #

    My home page control plugin will let you install WordPress in the root directory yet have the blog in a sub-directory. Then to get an excerpt of the latest post to appear on the home page, just create a custom home.php file for your template that will do that.

  3. Chris_K
    Member
    Posted 7 years ago #

  4. nohea
    Member
    Posted 7 years ago #

    Thank you, filsofo. So I activated your plugin, and made a fresh install of WP in the subdirectory of my domain where I will want the blog to be (http://urbangriffin.com/unjour/news/). Now, I don't find how to create a semi-static homepage that will sit in the parent directory (http://urbangriffin.com/unjour/) and other static pages like an 'About' page (http://urbangriffin.com/about/) or a 'FAQ' page (http://urbangriffin.com/faq/).

    What are the steps exactly, or did I not follow the instructions correctly ? :)

  5. nohea
    Member
    Posted 7 years ago #

    Alright, so, now I have the WP install in its own directory (http://urbangriffin.com/unjour/wordpress/). I set the blog homepage in the general options to be http://urbangriffin.com/unjour/ and the actual blog to be in http://urbangriffin.com/unjour/news/ in the Home-page control options. I have a 'home.php' template in my theme folder, but it's not picking it up. The homepage shows the same content as the blog content in the sub-directory, instead of the special semi-static content I coded in home.php... :)

  6. Austin Matzko
    Member
    Posted 7 years ago #

    You must have permalinks on for my plugin to work, and I can see on your site that you don't.

  7. nohea
    Member
    Posted 7 years ago #

    The permalinks work, those you mean: http://urbangriffin.com/unjour/news/2006/05/25/hello-world/ ? I did the procedure to have "Pretty" permalinks, and each post displays one.

  8. nohea
    Member
    Posted 7 years ago #

    I managed it all without the plugin. :)

    /me kneels at the altar of WordPress.

  9. Austin Matzko
    Member
    Posted 7 years ago #

    Whatever works for you. :-)

  10. nohea
    Member
    Posted 7 years ago #

    Ah, no! It wasn't really working, but there was no error.php setup, so it kept returning the index.php, giving me the illusion I had successfully set the blog to look the way I wanted. I guess I may give the plugin another go later then. :)

  11. nohea
    Member
    Posted 7 years ago #

    Alright, I can safely say your plugin now works. Thanks a lot for it, filosofo. Selecting a random page created in the drop-down menu makes the home.php be used as homepage. Shouldn't it display the page selected instead, though ? I do have a page.php template, so logically, nothing hampers one of those pages to be displayed...

    Anyway, for now it's doing what I want. I'm just worried that it does not make really sense to work like that and I'm anxious that it should stop working one day. :|

    Cheers. :)

  12. mutahir
    Member
    Posted 7 years ago #

    nohea, how did you displayed latest posts excerpt on ur homepage ? I mean without using the static plugin.

    I wanna do the same as well...:)

    regards
    M

  13. Austin Matzko
    Member
    Posted 7 years ago #

    Selecting a random page created in the drop-down menu makes the home.php be used as homepage. Shouldn't it display the page selected instead, though ? I do have a page.php template, so logically, nothing hampers one of those pages to be displayed...

    I should probably put that into the "docs," but that's the way it's supposed to work. home.php is supposed to be the template that appears on your homepage, and it still is when you activate my plugin. That means that when you select a page in the drop-down menu, it will render that page using the home.php template, if it exists. If it doesn't exist, then it will use the page.php template; if not that, then the index.php.

    You're not the first person confused by that, although there are others who requested it before it was a feature. It makes sense to me. :-)

  14. nohea
    Member
    Posted 7 years ago #

    Great, filosofo, well, that's what I wanted the plugin just to do for me, and I'm glad this is how you had meant it to work. It reassures me to know it was the intent all along. ;)

    Mutahir: I used the excerpt_reloaded plugin (http://guff.szub.net/2005/02/26/the-excerpt-reloaded/) and placed the tag inside a Loop in home.php :)

Topic Closed

This topic has been closed to new replies.

About this Topic