home_url()
will accept a parameter that will be used in the creation of the URL.
The bare minimum solution would be:
add_action(
'wp_logout',
create_function(
'',
'wp_redirect(home_url("/path/to/page"));exit();'
)
);
site_url()
will also accept the same parameter and may be (probably is) a better choice.
I believe that using either of those will make the link dependent on permalink settings. I don’t think that those function will translate between different settings, though I have not tested that.
I would suggest using get_permalink()
with an explicit page/post ID.
add_action(
'wp_logout',
create_function(
'',
'wp_redirect("'.get_permalink(1).'");exit();'
)
);
Note that you don’t need home_url()
or site_url()
since get_pemalink()
will generate the complete URL.