• Resolved maspegren

    (@maspegren)


    Hello, I’d like the last trade date to be displayed under the price instead on hover. There doesn’t seem to be a variable for that though. Is this possible?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hello @maspegren,

    I would add support for keyword %ltarde% to next release. Until then, you can do the following to achieve this before the release:

    1. Open in code editor file /wp-content/plugins/stock-ticker/stock-ticker.php
    2. Go to line 672 which contains following line of code: $template = str_replace( '%volume%', $q_volume, $template );
    3. Add below that line a new one with this code: $template = str_replace( '%ltrade%', $q_ltrade, $template );
    4. Save changes in file and then update Item Template in plugin settings and add %ltrade% as per your needs.

    Please note, if you are not familiar with editing PHP files, send this instruction to your developer so he can do it for you on your website.

    I’ll update you in this ticket once I release a new version of the plugin with support for %ltrade% keyword.

    Kind regards,
    Aleksandar

    Thread Starter maspegren

    (@maspegren)

    That worked, thanks! Do you think it’d be possible to toss a filter on that date string too so I could hook into it from functions.php to give it a different format?

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hi @maspegren,

    There will be something even better – a modifier for %ltrade% template keyword, so you format date with standard PHP date format parameters https://www.php.net/manual/en/datetime.format.php

    For example %company% %price% %change% %changep% <em>Last trade: %ltrade|l, jS \of F Y%</em> will give you something like on this screenshot https://drive.google.com/file/d/1sTqzVih-vVlkOg-WNIYi_GOmz0V6cT4o/view?usp=sharing

    Regards,
    Aleksandar

    Thread Starter maspegren

    (@maspegren)

    That sounds great! When do you foresee that update coming out?

    Plugin Author Aleksandar Uro?evi?

    (@urkekg)

    Hi @maspegren,

    I have released version 3.2.0 with this improvement.

    Cheers,
    Aleksandar

    Thread Starter maspegren

    (@maspegren)

    That worked perfectly, thank you!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Display last trade date’ is closed to new replies.