• [ Moderator note: moved to Fixing WordPress. Please do not use Developing With WordPress for these topics. ]

    Hi,

    I don’t know how to achieve something which sounds very simple and I would welcome some thoughts from this creative and knowledgeable community.

    I have a site where I would like to have some intro text most of the time. But when there is news, I would like that intro text to be replaced with the news item. As the news ages off I would like to show my default text again. Of course, I would like titles to come with the text as well as the “Read more” type links.

    Let’s take a look at the specific setup I have on my beta site (https://beta.sammamishmosque.com):

    The text “We are the local Masjid (mosque) located in the heart of Sammamish…” is the default text with the header “Welcome to Sammamish Mosque!”. This should be there most of the time.

    But sometimes, especially when there is an announcement or breaking news, I want a president’s message displayed. In the current example it is the text beginning with “On behalf of the SMA boards, I would like to invite you to our annual neighborhood picnic.” is a time-relevant President’s Message that is only relevant till the picnic occurs together with the header “President’s Message”. Then, after the picnic is over, it should go back to the default text. I need to be able to decide ahead of time when a news item will become irrelevant.

    At any one time, there should only be the default text or the latest news item displaying. Since I don’t know how to do it right now, on my beta site I am displaying both.

    Also, on another page I would like to be able to list all the news items.

    How can I achieve this through WordPress? It sounds totally doable, but I can’t seem to find any combinations of plug-ins that would make this possible.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    Assuming you’re pulling the news from a post in the category “news”, what I’d do is get the most recent news post and, if the publication date is less than X days, display it instead of the default text. Another option is to display any post in the category “featured”, so if you want a post to replace the text on the front page, you’d put it in the featured category as well as “news”. Remove it from “featured” to remove it from the front page.

    This will require some coding, of course. You’re not going to find a plugin that will do it.

    Thread Starter atabhatti

    (@atabhatti)

    Is there any way to do this without custom coding? I help run a non-profit staffed by volunteers. We don’t have programmers to code or support this longer term.

    Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    In my opinion, custom coding is necessary. Find a member of your mosque who does coding, give him the title “webmaster”, and volunteer him to fix the site. ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Default post or Latest News Post’ is closed to new replies.