Support » Fixing WordPress » Daily Refreshing Posts On Home Page

  • Hi guys,
    I’m working on one simple wordpress restaurant page. And I have found a problem with some posts. The URL of the page is ganesh. It’s just a test domain.
    I need to automatically refresh post about daily menus on the home page. It should works like this: The restaurant writes a note/blog/any text doc. where the menus are. This doc. contains menus for every day. The wordpress should be able to separate the days and post only the actual day menu on home page. I’d like to do it as automatic as it can be.
    Is there any way how to do it the easiest way?
    Thank you for your help

Viewing 7 replies - 1 through 7 (of 7 total)
  • You can set the number of posts you want to appear on the home page in the Settings > Reading dashboard. This is set to ’10’ by default, but if you set it to ‘1’, you’ll only see the most recent post on this page.

    I hope I’ve understood your question correctly.

    — Kevin.

    Thank you Kevin but I don’t think this is what I need. If you open the page you can see the main picture and under it 3 smaller pictures with text bellow. And right under the smaller pictures I just want to be visible only the menu for Monday. Next day only for Tuesday and so on.

    Moderator Jose Castaneda



    It sounds doable to me. Using WP_Query you can use the Time Parameters to display the current day’s post(s).

    $today = getdate();
    $query = new WP_Query( 'year=' . $today["year"] . '&monthnum=' . $today["mon"] . '&day=' . $today["mday"] );

    Hope that helps a bit. 🙂

    Thank you and do you know how to split one document into 5 different posts to be displayed ?

    Moderator Jose Castaneda



    What do you mean split the document? Like list style?

    I mean that somebody writes one document which will contain menus for monday/tuesday/wednesday/thursday/friday/saturday/sunday and some script or something will split it into separate days and show on home page only the current day

    This looks pretty close to what you’re describing, adrian.meri. (I presume you’ve found a solution by now, though I don’t yet see a specials link working on your site.)
    Good luck!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Daily Refreshing Posts On Home Page’ is closed to new replies.