• Resolved eneri81

    (@eneri81)


    Hi,

    I do have a WP Multisite with several subdomains.

    The privacy policy we’re using is part of the main page e.g. mydomain.de/privacy
    Menues of the subdomain refere to this page. But within Settings >> Privacy I can only select pages of the current subdomain.
    Any chance, to define this page for the entire network or add a URL to the settings?

    Thanks.
    Irene

Viewing 8 replies - 1 through 8 (of 8 total)
  • Joey

    (@leglesslizard)

    Hey,

    It appears this has a filter so you can dictate which page is used for the privacy policy. By adding something like the following in your theme’s functions.php file you can hopefully achieve what you need:

    add_filter( 'privacy_policy_url', 'alter_privacy_policy_url', 10, 2 );
    function ( $url, $policy_page_id ) {
        return 'https://my-website-url.com/my-privacy-page/'
    }
    Thread Starter eneri81

    (@eneri81)

    Hi,

    I did try to add this code to our functions.php – but it seems not to work. The page is no longer available, if I add this to end of the file. (Using 3clicks-theme of bringthepixel.com)

    // Define gospel-forum.de/kontakt/datenschutz as global privacy page for all subdomains
    add_filter( 'privacy_policy_url', 'alter_privacy_policy_url', 10, 2 );
    function ( $url, $policy_page_id ) {
        return 'https://gospel-forum.de/kontakt/datenschutz/'
    }

    Any other suggestions?
    Thanks.
    Irene

    Joey

    (@leglesslizard)

    I’m afraid I’m not in a position to check this out for you at the moment so it may be worth closing off this topic and starting a new one. I might get some time next week to have a look if you haven’t made any progress.

    Good luck

    Thread Starter eneri81

    (@eneri81)

    Hi Joey,

    thanks for your feedback. Unfortunately I can not think of a solution that might pop up to me ??
    The new privacy feature is a great advatage within wordpress, but it’s not helpful for multisite pages. Am I the only person having this problem?

    What would it help, to close this topic and start a new one? Or is there a “Feature Request” forum?

    Thanks.
    Irene

    Joey

    (@leglesslizard)

    Hi Irene,

    I actually revisited your problem and I think I misunderstood in the first instance. Am I right in thinking you have one URL you want all of your sites to land on when visiting your privacy policy? If so, how and where is the link to this page displayed on the frontend? If it is only placed in the menu then you can specify a URL rather than a page and alter the menu on each sub domain.

    My previous answer was for when you output the privacy policy URL via code in a template for example.

    Thread Starter eneri81

    (@eneri81)

    Hi Joey,

    yes, that’s exactly what we’re doing since the page went live some years ago: The footer menu of each subdomain contains a link to “gospel-forum.de/kontakt/datenschutz”.

    But I’m not able to select this page within WordPress -> Settings -> Privacy. (Wich would be helpful for any Opt-Out-Plugins e.g. for google analytics.)

    Thanks.
    Irene

    Joey

    (@leglesslizard)

    Oh sorry Irene I fully understand now and am unsure of a suitable solution for the problem.

    The code I posted above should filter the result of any extension trying to retrieve the privacy URL using the appropriate methods (if they opt to get it straight from the database there is not a lot you can do). I did notice that I made a couple of errors when I typed it up, however, so am pasting again here in case it is of use to you.

    // Define gospel-forum.de/kontakt/datenschutz as global privacy page for all subdomains
    add_filter( 'privacy_policy_url', 'alter_privacy_policy_url', 10, 2 );
    function alter_privacy_policy_url( $url, $policy_page_id ) {
        return 'https://gospel-forum.de/kontakt/datenschutz/';
    }

    If not, then maybe do as you suggested and close this topic off and start another. Maybe someone who has dealt with the issue will be of more help.

    Thread Starter eneri81

    (@eneri81)

    Hi Joey,

    thanks. I could add the new code to the functions.php.
    I’ll get back to the plugin developers, if this will help using their plugin within multisite pages.

    Thank you very much,
    Irene

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Use mydomain.de/privacy for sub.mydomain.de’ is closed to new replies.