Support » Plugin: List category posts » Parameters to Compare

  • Resolved rocktambulos

    (@rocktambulos)


    Hi! I’m trying to create a widget to show birthdays, like “this day in rock” so I want to show only posts published on an specific date. It would be great if I could do this with a shortcode, showing only posts published today and days like today, no matter the year, something like [catlist name=birthdays monthnum=4 day=19] and see all posts published on april 19th.

    I’m planning to set the birthday as the published date but, due to there is no parameter to show specific days, I’m planning set the published date one year before. This way I can ask the query to show me only the posts from an specific category (birthdays) and published in a day like today, but 1 year ago. The result should be a different post everyday. The thing is, that I also cannot configure the right shortcode to make it and I’m wondering if that’s also imposible to do. Can you help me to create this widget? Thanks in advance

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Contributor zymeth25

    (@zymeth25)

    To clarify, you want to select all posts that match today’s day and month in any year. Is that correct?

    Thread Starter rocktambulos

    (@rocktambulos)

    That’s Correct!. All posts from a specific category that match today’s day and month

    Plugin Contributor zymeth25

    (@zymeth25)

    This is currently not supported. It would require the possiblity to set day and monthnum dynamically which is not implemented. So unless you want to call the shortcode from PHP and implement it yourself, it won’t work.

    • This reply was modified 5 months ago by zymeth25.
    Thread Starter rocktambulos

    (@rocktambulos)

    Ok, is what I feared. So, my plan B is using the comparative parameter, but I can’t find the right shortcode.

    Can I can ask the query to show me only the posts from an specific category and published in a day like today, but 1 year ago???. Something like [catlist compare=birthday,equals,-1 year, DATE] (this is an example)

    Is that possible? because if I set the published data in 2020, that shortcode could give me what I looking for

    Or how can I implement the code from php? If you have any code to suggest me, I can do it

    Plugin Contributor zymeth25

    (@zymeth25)

    Ok, is what I feared. So, my plan B is using the comparative parameter, but I can’t find the right shortcode.

    I assume you are referring to the customfield_compare parameter. If you want to use it you would have to store dates in custom fields. If you want to show posts from the same day and month but one year ago you can do it like this:

    [catlist after="-1 year -1 day" before="-1 year +1 day"]

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.