• Resolved mainosfo

    (@mainosfo)


    I’m using the List category post plugin on my client’s website. Now, I’ve encountered an issue: how can I arrange the following headings in order based on the date mentioned within them, not the publication date of the articles? The headings to be sorted by date are as follows:

    <main class=”relative h-full w-full flex-1 overflow-auto transition-width”>
    • 8.5.2024 Course A €90.00+VAT6.4.2024 Course B (7h) €82.00+VAT5.4.2024 Course C €82.00+VAT5.4. and 12.4.2024 Course D (2 days) €158+VAT26.4.2024 Course B (7h) €82.00+VAT25.3.2024 Course A €90.00+VAT23.3.2024 Course E €82.00+VAT20.4.2024 Course C €82.00+VAT19.4.2024 Course A €90.00+VAT11.4.2024 Course B (7h) €82.00+VAT

    I need to sort these headings according to the dates mentioned within them using a widget. If I sort them by the post title, they don’t get ordered correctly, which is expected.I also looked into the shortcode section but couldn’t find a solution there either.My client inputs these articles to be published multiple times, and often the dates in the article titles are three months ahead. It’s not a solution for them to schedule these articles. Then I could use the sort by date function. That’s presumably asking for too much :)Is there any way?

    </main>

Viewing 1 replies (of 1 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    The problem is this is too specific – it needs a feature that would parse every post’s title, find a date matching a specific format and sort based on that. This is something developers do for their clients as a specific customisation.

    The thing is your client, for their convenience, does something that is rather bad practice. There are several ways to solve this problem if they could be convinced to do at least one more thing other than putting the date in the title. For instance, if you created a custom field for all posts called, say, “custom-date”, you could then use LCP plugin’s custom field sorting features. All yor client would have to do is always remember to set a value to that custom field.

    Hope this helps.

Viewing 1 replies (of 1 total)
  • The topic ‘Order by dates in post titles?’ is closed to new replies.