Sign in

Are there any dynamic shortcodes available?

  • This topic has 6 replies, 4 voices, and was last updated 1 year, 2 months ago by .
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #7679
    Avatar photoritesh

    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 photoritesh

    Any update on this?

    #7763
    Avatar photoSimon99

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

    #7764
    Avatar photoBob

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

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #7765
    Avatar photoSimon99
    Bob 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 photoritesh
    Bob wrote:

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

    It doesn’t work in post titles

    #7894
    Avatar photoTomasz Dziuda

    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.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

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