hello, need redirect after submit listing, ideally, it would preserve the standard display function and the required link would open in a new _blank window, but I don’t require that. the main requirement is that the specific page opens on my website. I tried to create this snippet but it doesn’t work, what am I doing wrong?
add_action('hivepress/v1/listings/create', function($listing_id) {
if ($listing_id) {
wp_redirect(get_permalink(7));
exit;
}
});
Unfortunately this snippet will not work since the initial listing creation occurs on the back-end in background, not during the page rendering.
Please send more details about this issue, do you want to simply redirect the Listing Submitted page? Opening another tab may require a JS solution and not allowed by some browsers for security reasons.