WordPress.org

Ready to get started?Download WordPress

Forums

Daily Refreshing Posts On Home Page (8 posts)

  1. adrian.meri
    Member
    Posted 1 year ago #

    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
    Adrian

  2. Kevin Ashbridge
    Member
    Posted 1 year ago #

    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.

  3. adrian.meri
    Member
    Posted 1 year ago #

    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.

  4. Jose Castaneda
    Member
    Posted 1 year ago #

    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. :)

  5. adrian.meri
    Member
    Posted 1 year ago #

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

  6. Jose Castaneda
    Member
    Posted 1 year ago #

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

  7. adrian.meri
    Member
    Posted 1 year ago #

    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

  8. CMSSwitch
    Member
    Posted 1 year ago #

    http://wordpress.org/extend/plugins/st-daily-tip/

    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!

Topic Closed

This topic has been closed to new replies.

About this Topic