Hi,
Thanks for your response! I just tried your solution for question 1, but the Latest Review block is still not displaying the name of the parent page beside the assigned page.
As regards 2, I’ll just type it out and it can be moved to a new post if necessary:
I’ve tried three different ways to reload the page after form submission but I can’t get it to work.
Method 1:
Adding this to functions.php:
add_action(‘site-reviews/review/created’, function ($review, $command) {
header(“Refresh:0″);
exit;
}, 10, 2);
Result: Submit button spins.
Method 2.
Adding this javascript to footer with Astra (theme) Hooks:
document.addEventListener(‘site-reviews/after/submission’, function (event) {
if (false !== event.detail.errors) return; // stop if there were errors
location.reload(true); // reload the page from the server instead of the browser cache.
});
Result: prints this literally to footer.
Method 3.
add_action(‘site-reviews/review/created’, function ($review, $command) {
echo ‘<script type=”text/javascript”> location.reload(true); </script>’;
}, 10, 2);
Result: Submit button spins.
Any suggestions?