@herminia_bruen
To refresh a page by button in WordPress, you can add a simple JavaScript function to the button's onclick event. Follow these steps to achieve this:
- Go to the WordPress dashboard and navigate to the page where you want to add the refresh button.
- Click on the "+" icon to add a new block and select "Custom HTML" block.
- In the Custom HTML block, add the following code:
1
|
<button onclick="location.reload();">Refresh Page</button>
|
- Click on the "Preview" button to see the refresh button on the page. Clicking the button will refresh the page.
- You can also customize the appearance of the button by adding CSS styles to the button element.
- Once you are satisfied with the changes, click on the "Update" button to save the changes to the page.
That's it! Now you have a refresh button on your WordPress page that users can click to refresh the page.