Hi all,

I have WordPress blog, problem is that when we upload new content and browse the blog the latest change won't appear on blog until unless explicitly refresh the page after opening a blog.

Here is the blog URL: https://corevoila.in/

Any help or clue will be appreciated

Thanks

As wordpress uses php, php is server side actions which means the blog will update etc on your server, you will have to explicitly refresh the page to run the browser side again to show the updates. You can do this using javascript, similar to something like this -

<script type="text/javascript">
        function refresh_my_page() {            
            var mysite = "https://mysite.com/";
            var page_refresh = "mypagetoshoworrefresh.php#";
            var my_blog_id = "bloginfo?id=";
            //my_blog_id will be latest blog you added to your table, grab the id from your php page, 
            //add it to your url and then re-load the url to show the
            //actual blog post thatw as just added...

            var url_go_to = mysite + page_refresh + my_blog_id;
            window.location.href = url_go_to;
            location.reload();          
        }
    </script>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.