• Resolved elzinko

    (@elzinko)


    Hello!

    If I have a single wordpress installation, is it possible to have 2 domains or subdomains being redirect to different parts of my wordpress with different theme, as if their were distinct websites.

    BTW, I use ACF for post creation.

    Is that possible ?

    Cannot find this information in google or forums. Maybe my search is not the right one…

    Thanks for help

Viewing 5 replies - 1 through 5 (of 5 total)
  • Alan Fuller

    (@alanfuller)

    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?

    Thread Starter elzinko

    (@elzinko)

    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

    Alan Fuller

    (@alanfuller)

    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/

    JNashHawkins

    (@jnashhawkins)

    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.

    Thread Starter elzinko

    (@elzinko)

    Alright, thanks for all your advice, it helped me a lot to clarify my mind.
    So let’s start with multisite 😉

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘2 websites in same wordpress without multisite’ is closed to new replies.