• I would like to add a block to my WordPress website that will grab the latest “East View” image. However, I can only seem to get a static version that will not change. I am able to do it with other pages, using the image block “Insert from URL” feature.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • You will probably need to search for a dynamic block if you want it to change without reloading the page. It would have to be able to connect using the REST api and would need to set a nonce to allow it to access the back end. Stackable builder has a dynamic post block but that all I could really see. You will probably need to look for a block are javascript in order for it to be dynamic.

    • This reply was modified 2 years, 1 month ago by mrtom414.
    • This reply was modified 2 years, 1 month ago by mrtom414.

    A little javascript function at frontend will fetch latest image from backend allow your to replace images in real time.

    What is the link of other page where its working perfeclty?

    The site you listed isn’t a WordPress site. You would either have to build a scraper or contact the blog owner api to allow you to query the site. You could query a wordpress site using this command site/wp-json/wp/v2/post to get a list of the post and post information. You could use a program like postman to aid you with this. But, if doesn’t support an api you would have to build a scraper and determine a method to figure out what the last post is.

    • This reply was modified 2 years, 1 month ago by mrtom414.

    You should also make sure the blog owner is ok with you posting their images. The image are not marked as public domain so you could get in trouble for copywrite infringements.

    • This reply was modified 2 years, 1 month ago by mrtom414.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Linking to changing image file’ is closed to new replies.