Possible yes.
Difficult, probably.
You might be able to do it by filtering options siteurl and home
https://developer.ww.wp.xz.cn/reference/hooks/option_option/
and some clever .htaccess
and maybe something needs to be done with template_redirect
https://developer.ww.wp.xz.cn/reference/hooks/template_redirect/
Never tried it myself
But why not either use multisite or create two sites?
Hell Alan,
First, thanks for your reply !
What about this solution ?
– forward to right subfolder
– domain.site1.fr (apache)=> domain/site1 (.htaccess)=> wp-content/site1/index.php
– domain.site2.fr (apache)=> domain/site2(.htaccess)=> wp-content/site2/index.php
– Then select the theme dynamically
I try to find a technical alternative to multisite because I want to share some posts (created using ACF) between 2 websites. But the more I dig in the “no multisite” way, the more I find it is difficult to achieve.
I really think I will use multisite. Maybe I could use this “plugin” to share some content between 2 sites. But I am not sure that this is compatible with ACF.
Thanks
I think it would be easier to solver sharing some posts between multisite than sharing domains between one site.
If you are up to building custom post or page templates see https://developer.ww.wp.xz.cn/reference/functions/switch_to_blog/
You might try pointing a domain at a single page, tag, or category. Anything else gets confusing… but… actually following links from a page done that way can get confusing also.
There are plugins that will let you assign different themes to different pages and you can get creative with code…
A multisite or two installs on the server might be easier and most web hosts support that via ‘addon domains’ or subdirectories.
Alright, thanks for all your advice, it helped me a lot to clarify my mind.
So let’s start with multisite 😉