• Currently when I add a new user account they are directed to wp-activate.php This page currenly has all the web pages listed and linked. I would like to get rid of this and maybe customize the message. Any ideas where I should start?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    Hook the filter ‘wpmu_signup_user_notification_email’ and return your email message with a link to your activation page along with the activation key. Your activation page needs to more or less replicate the functionality of the default page, mainly calling wpmu_activate_signup()

    The issue you run into with custom PHP pages is how to load the WP environment. Any safe place you can put your page is of an unknown relationship to wp-load.php, so you cannot simply require it like core pages would. (unless this is for your own installation only) For functionality in other installations, you need to send the request to something where the environment is loaded for you. This includes AJAX calls, custom page templates, or going through wp-admin/admin-post.php.

    Thread Starter stackaruk

    (@stackaruk)

    Thanks bcworkz, if I just want to loose the list of pages and links what is the easiest method? I’m not comfortable writing hooks.

    Moderator bcworkz

    (@bcworkz)

    I didn’t think my advice through very well. My suggestion is pretty extreme for your needs, I apologize. There is no need to replace the page to meet your needs.

    The default page does not list files, this is something your theme is doing. There aren’t really any hooks in the page to insert content like that other than the theme’s standard header and footer templates.

    Not knowing your theme, I can only speculate. Your theme may be detecting the current page is the activation page and generates the content you are seeing. If you examine the corresponding theme templates, you might be able to identify such code. If found, you only need to alter the script that identifies the activate page so that it never correctly identifies the page.

    For example, there may be a string search in the request URL for “activate”. Simply changing the spelling of activate will cause the page to never be identified.

    I remind you, I’m just speculating. All I really know is the default page doesn’t output a page list.

    It is possible to change the message that is part of the default page, but it would require writing a hook function. If you think you will be doing more WP customization in the future, I encourage you to take some time to really understand how filter and action hooks work. Hooks are the primary way to customize WP, it’s very difficult to customize WP without using hooks.

    Thread Starter stackaruk

    (@stackaruk)

    Great feedback bcworkz! I’m using Pagelines Frameworks…I’ll poke around and see what comes up. Cheers:)

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

The topic ‘How to edit wp-activate.php’ is closed to new replies.