am v5.1.7 wp v4.6 I have some shortcodes that just dont seem to be working properly on login page (seems not to be loading all js_composer scripts) Is there a way I can set a class on the body tag so that I can hide the errors using css. I need a way of selecting just the items on the login page.
Hello, Do you want to avoid editing of templates? You can use the following code in file site.php in this case: http://www.amember.com/docs/Site.php_file PHP: Am_Di::getInstance()->hook->add(Am_Event::AFTER_RENDER, function(Am_Event_AfterRender $e) { if (strpos($e->getTemplateName(), 'login.phtml')!==false) { $e->replace('/<body/', '<body class="login-page" '); }}); This code add class login-page to body tag. In case of your layout already have class attribute on body then you need to modify my code in order to add additional class to existing attribute instead of add additional one. Best Regards.
That's great! many thanks. I'll give it a go. Can you let me know, the option for editing the templates as well please?
It worked! Perfectctly, many thanks. Changed to $e->replace('/<body class="/', '<body class="login-page '); to add to exisitng classes on body
It is great. File with template can be found here: application/default/views/admin/login.phtml By the way login page already have unique CSS class and you can use it in your CSS cascade - form-login-wrapper Reference: http://www.amember.com/docs/Themes_and_Templates