If what you want is is a full page refresh then you don’t need ajax at all and inserting the htt-equip
html meta will do the trick
<meta http-equiv="refresh" content="5" >
(content is time in seconds IIRC)
You just hook on wp_head
and insert it.
function wpse_228671_wp_head() {
echo '<meta http-equiv="refresh" content="5" >';
}
add_action('wp_head','wpse_228671_wp_head');
Related Posts:
- Determine if page is the Posts Page
- Get the Current Page Number
- Stop WP from creating “Sample Page” and “Hello World!” post
- Keyboard shortcut for updating a page or post?
- Apply the_title() filter in post & page title, but not in menu title
- How to display by default only published posts/pages in the admin area?
- How to make comments work for a post loaded per Ajax?
- Get current menu_order
- Difference between an archive and a page listing posts
- Delete Associated Media Upon Page Deletion
- The next_posts_link() works only with original $wp_query
- Get content from one page and show it on another page
- How to Check if a Page Exists by URL?
- Connection lost. Saving has been disabled… (Updating Posts/Pages)
- get_children() Not Working with orderby Parameter
- Ajax Load More Posts in Category Page
- how to limit edit_form_after_title hook to page and post edit only?
- Using single.php from plugin folder instead of default template folder
- Post/Page Publish/Update button not clickable once I make an edit
- Strategy for handling hierarchical pages with empty parent content
- Skipping first 3 posts in wp query
- Custom Field in Featured image for A particular post
- How to add a new tab to page editor
- How to load paginated post pages via ajax
- Getting the post_id in wp_ajax function
- How to display the page title/content in the Posts page?
- Callback for wp.autosave.server.triggerSave();
- How can I see a list of pages and post where my custom Gutenberg block is used?
- Restore contents of deleted user
- disable password protected page for logged users
- How to change post to page
- RSS for Pages Instead of Posts?
- Display posts by tag on page
- Can I load posts via Ajax?
- Why do I need to use The Loop on pages (inside page.php etc)?
- What is the difference between “post” and “page” in WordPress?
- Create custom page in WooCommerce
- Load posts dynamically
- posts page – different lengths of excerpt
- WordPress automatic and permanent page
- Is there a WordPress equivalent to MediaWiki templates
- Determining Slug Before and After Edit
- Getting an alphabetic post list with two letters onclick on letter
- How to load post content on index page using ajax when post title in sidebar is clicked
- Automatically create pages in a post based on number of words
- Static posts page with home.php
- How to use oEmbeds on Post Content during AJAX requests
- Change WordPress post-state in Admin Area
- Pagination not working on Custom Page Template
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- This AJAX Code Doesn’t Work – Looking for elegant solution
- Cannot access current post’s ID in custom plugin
- Set number of article per number of page
- Pagination for Pages and Posts
- Is it possible to show a different WP menu when using password protected pages?
- Can I change a post to a page by changing it’s type?
- Overview with latest edited posts and pages
- how to show all post in my page-grid.php template page
- eBooks download website, page or post?
- Multiple loops in same page, without duplicate content
- Add a custom option to a page in backend
- Include related posts on a page
- Load post content into div with ajax
- POST from jQuery to PHP
- why does HTML Tag not working in Post and Page
- “Uncaught SyntaxError: Unexpected token
- Creating new page with pre-defined parent page
- problem to delete page
- Why does `url_to_postid` return 0 when testing `page_for_posts` Page?
- Populating a page with content from post custom fields
- Can I hide a specific post from latest posts page?
- Hide add new page button
- Edit menu item title from edit page/post
- Redirect before post page
- $post object is null
- WordPress theme ajax have_posts()
- How to show post(excerpt) from specific category on wp page?
- When paginating a Page with the tag, how can the 2nd and subsequent page styles be customised?
- The correct way to call posts with ajax
- How do I use Ajax to show the new posts realtime, on the frontpage
- Is there any WordPress alternative to Book module of Drupal?
- Changing my permalink structure – will new layout conflict with existing page?
- Convert a complex webpage into WP theme
- How To Keep Posts from Being Displayed Two or More Times on My Homepage? [closed]
- how load content as pop-up using ajax
- Load content in a div with ajax
- disable column on post and user list
- WP_Query do not load specifed number of post
- Can a page_id and a post_id be same?
- How to restore permanently trash page? [closed]
- Custom Blog Post Page
- When inserting media file in a post or page, show file name under the thumbnail
- Code understanding
- Hide page title on dedicated posts page
- Implement AJAX ‘load more’ with offset posts
- Xhr.send : PDF upload failed with status 400 and response 0
- It tells me that I exceeded the maximum number of executions when trying to publish content
- Parameter for pagination posts_pagination
- /wp-admin/admin-ajax.php Error 500 while using divi premade layout in existing pages
- Issue Copying Posts and Pages from One WordPress Site to Another