• Resolved manuarmand

    (@manuarmand)


    I there,

    I can’t find out how to insert dynamically the current year in the title & description.

    Is it possible with TSF ?

    Tks

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Sybre Waaijer

    (@cybr)

    Howdy!

    I just answered a similar question 10 hours ago: https://www.ads-software.com/support/topic/post-title-autodisplay-current-date/#post-18046177.

    To make this also work for descriptions, you’d need to implement this line of code as well:

    // Activate shortcode rendering in custom descriptions.
    add_filter( 'the_seo_framework_custom_field_description', 'apply_shortcodes' );
    
    Thread Starter manuarmand

    (@manuarmand)

    Yes I have seen this post but i thought it was for post title (not meta title).

    Sorry

    Tks

    Thread Starter manuarmand

    (@manuarmand)

    I have read you post and your documentation
    “You’ll need to test and maintain filters with every update you make to your site, so updating your WordPress installation becomes a time-consuming and risky chore because of this. We only recommend using filters if there’s no better way.”

    It seems that in your opinion, it is not the best idea to use that kind of tricks.

    Just a question please : a few other seo plugins have this functionnality without asking the user to add some code. Maybe there is another solution for you to add this functionnality in TSF no ?

    Tks for your time

    • This reply was modified 1 month, 3 weeks ago by manuarmand.
    Plugin Author Sybre Waaijer

    (@cybr)

    Hi again!

    There’s no need to apologize, I’m happy to help ??

    TSF does not affect the “Post Title” (h1), but it does use that to create the “Meta Title” (<title>).

    You’re correct in quoting that part of my documentation — I put it there as a disclaimer. I am strict in presenting features, so sometimes, there’s no better alternative than filters. I created over 200 filter hooks for these situations, but custom filters could stop working after an update by WordPress or The SEO Framework. Although I always give a year of deprecation notices, a developer must get involved when the filters cause issues and require modification. With the no-code structure of WordPress that caters to most people, I think the disclaimer is necessary.

    I plan to make what you’ve requested as a feature: https://github.com/sybrew/the-seo-framework/issues/140. However, only a few users have requested this; they almost always ask to put the date into the title or description, which is actually a bad practice. Google already puts the date in front of the description when it’s annotated in the content: https://developers.google.com/search/docs/appearance/publication-dates.

    Moreover, TSF’s current interface doesn’t lend itself to making this feature feasible or intuitive, so it requires much planning to come to fruition. Currently, about 2500 lines of code are working to make the simple HTML “text field” appear “as-is” by considering many things about your site; there are 1000 lines for the browser visuals alone. I am sorry to say we won’t see a glimpse of this feature anytime soon. Still, all other SEO plugins do it, so there’s something for everyone :).

    Thread Starter manuarmand

    (@manuarmand)

    Thank you Sybre for your detailed reply.

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