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

Viewing 13 replies - 1 through 13 (of 13 total)
  • 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.

    Thread Starter nohea

    (@nohea)

    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 (https://urbangriffin.com/unjour/news/). Now, I don’t find how to create a semi-static homepage that will sit in the parent directory (https://urbangriffin.com/unjour/) and other static pages like an ‘About’ page (https://urbangriffin.com/about/) or a ‘FAQ’ page (https://urbangriffin.com/faq/).

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

    Thread Starter nohea

    (@nohea)

    Alright, so, now I have the WP install in its own directory (https://urbangriffin.com/unjour/wordpress/). I set the blog homepage in the general options to be https://urbangriffin.com/unjour/ and the actual blog to be in https://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… ??

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

    Thread Starter nohea

    (@nohea)

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

    Thread Starter nohea

    (@nohea)

    I managed it all without the plugin. ??

    /me kneels at the altar of WordPress.

    Whatever works for you. ??

    Thread Starter nohea

    (@nohea)

    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. ??

    Thread Starter nohea

    (@nohea)

    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. ??

    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

    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. ??

    Thread Starter nohea

    (@nohea)

    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 (https://guff.szub.net/2005/02/26/the-excerpt-reloaded/) and placed the tag inside a Loop in home.php ??

Viewing 13 replies - 1 through 13 (of 13 total)
  • The topic ‘Display excerpt on homepage when the blog is in a subdirectory’ is closed to new replies.