Download
We're evolving to serve you better! This current forum has transitioned to read-only mode. For new discussions, support, and engagement, we've moved to GitHub Discussions.

Are there any dynamic shortcodes available?

  • #7679
    Avatar photo[anonymous]

    Hi,

    I want to add a dynamic year to the post title, like 10 things to do in 2022, but the year should auto-update dynamically every year.

    Is that possible?

    Regards

    #7686
    Avatar photo[anonymous]

    Any update on this?

    #7763
    Avatar photo[anonymous]

    would also be useful in the footer for: © 2022 (2023…)

    #7764
    Avatar photoBob
    #7765
    Avatar photo[anonymous]
    [anonymous] wrote:

    ref: https://getpublii.com/dev/utils-global-variable/

    are there instructions somewhere where the global variable works? / where you have to insert it? it doesn’t work with footer copyright.

    #7873
    Avatar photo[anonymous]
    [anonymous] wrote:

    ref: https://getpublii.com/dev/utils-global-variable/

    It doesn’t work in post titles

    #7894
    Avatar photo[anonymous]

    I want to add a dynamic year to the post title, like 10 things to do in 2022, but the year should auto-update dynamically every year.

    It is not possible to do at this moment with titles. It can be possible with JS, but it probably won’t work with search engines.

    In fact the only solution is to create custom plugin which will modify post titles before render.

    But you must remember that it will also require re-render every year at least and also you must be sure that your post slugs does not contain year number.