Apologies–I’ve been meaning to write some more in-depth documentation on this, but haven’t had the time yet.
After activating the plugin, there should be an edit profile page at “https://mysite.com/profile”. (In case it’s not clear, this page isn’t a Page with a capital P, but rather a PHP file at front-end-users/views/settings.php
, so that it’s easier to customize its code.)
To make it easier to modify the login and registration pages so that they look more like the rest of the front-end site, Front-End Users provides three helpful functions that you’ll want to define in your theme’s functions.php: feu_login_head_element()
, feu_login_header()
, and feu_login_footer()
. The functions will output content in, respectively, the login and registration pages’ <head>
element, closely after their opening <body>
tag, and closely before the closing </body>
tag. This would allow you to add, for example, CSS into the <head>
element to style to login and registration pages, a nav menu after the <body>
, and a footer nav menu before the closing </body>
.
One way to do this is to logically group the contents of your theme’s header.php and footer.php into different files (e.g. move the <meta>
tags from header.php into includes/header-meta.php
, move the content after the opening <body>
tag into includes/header-content.php
, etc). You can then include each of the these includes/
files in both the appropriate Front-End Users function and in either header.php or footer.php. Here’s an example of what the three functions might look like:
global $theme_path;
$theme_path = get_theme_root().'/'.get_template().'/';
function feu_login_head_element() {
global $theme_path;
require $theme_path.'includes/header-title.php';
require $theme_path.'includes/header-meta.php';
require $theme_path.'includes/header-css.php';
require $theme_path.'includes/header-js.php';
wp_head();
}
function feu_login_header() {
global $theme_path;
require $theme_path.'includes/header-content.php';
}
function feu_login_footer() {
global $theme_path;
require $theme_path.'includes/footer-content.php';
wp_footer();
require $theme_path.'includes/footer-js.php';
}
This example is taken from front-end-users/example_hooks.php, which also shows some other useful hooks that Front-End Users provides.
Please let me know if any of this is unclear. This all unfortunately requires a little familiarity with PHP, but there really didn’t seem to be a simpler way to do it.
Best,
Tom