• Resolved aidancewebdev

    (@aidancewebdev)


    I’m using the shortcode [read_meter] all over the site and it works in every instance except within the homepage post template loop. The articles in this section for whatever reason, all display 1 minute.

    I’ve tried adding id=***] to the shortcode which does make it work properly, however being a loop it makes all the posts use the same id.

    The shortcode in this instance is being served within a Post Template block which is probably the issue, but the block is a default WordPress element so I figured it should work.

    Please advise. Thank you.

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter aidancewebdev

    (@aidancewebdev)

    Screenshots of the block structure on the page.

    Hi @aidancewebdev,

    It seems that you haven’t added the post ID to the shortcode. In order to make it sync with the actual post reading time, you will need to add the individual post ID to the shortcode. I have tested it on my end and it is working fine as expected. Here’s the format to add the complete shortcode: https://d.pr/i/YjKkNw.

    Here’s how you can access the posts’ IDs: https://www.elegantthemes.com/blog/tips-tricks/how-to-find-your-wordpress-page-id-and-post-id-and-what-you-can-do-with-them.

    Kind regards,
    Aradhy 😊

    Thread Starter aidancewebdev

    (@aidancewebdev)

    Thank you for your response Aradhy.
    I understand that the shortcode requires the post ID, however the posts being displayed are not static.

    Is it possible to use the post ID for whatever post is being shown in the loop? Such as [read_meter id=”get_the_ID();”] ?

    Hi @aidancewebdev,

    Unfortunately, using dynamic PHP functions directly inside a shortcode isn’t something that can be handled within the plugin’s scope. Implementing this would require custom code to extend the shortcode functionality, which falls outside what we’re able to provide.

    I will leave this to the forum if there’s someone who can help by sharing custom code or thoughts.

    Kind regards,
    Aradhy 🙂

    Thread Starter aidancewebdev

    (@aidancewebdev)

    Thank you Arady, that’s what I had suspected from my research. Not a problem, I will make it work!

    Your help is very much appreciated, thanks for the great plugin!

    Hi @aidancewebdev,

    You’re most welcome! I’m glad I could help clear that up. Really appreciate your understanding and kind words about the plugin. Feel free to mark this thread as Resolved and if you run into anything else we can assist with, please don’t hesitate to reach out.

    Wishing you the best with your project!

    Kind regards,
    Aradhy 🙂

    Thread Starter aidancewebdev

    (@aidancewebdev)

    It’s silly that I can’t just mark this resolved without entering a comment.

    Moderator Jan Dembowski

    (@jdembowski)

    Forum Moderator and Brute Squad

    It’s silly that I can’t just mark this resolved without entering a comment.

    If you look at the right sidebar at the middle of this topic, you can mark your topic status as “resolved”, “not resolved” or “not a support question” without leaving a reply.

    Hi @aidancewebdev,

    Actually, there is an option available on the right sidebar. Don’t hesitate to reach out if you need any further assistance in the future.

    Kind regards,
    Aradhy 🙂

Viewing 9 replies - 1 through 9 (of 9 total)

The topic ‘Another 1 minute read time problem’ is closed to new replies.