• Resolved Rui Cruz

    (@ruicruzpt)


    Hello,

    I’ve been using Collapse-O-Matic for some sites now.
    I want to call it to wp-register.php

    I was thinking of using something like this to call it:

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/style-login.css' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    However, since I already have one .css called, will it be ok to call anotehr? And if so, what file should I call?

    And should I do it like this?

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/style-login.css' );
        wp_enqueue_style( 'custom-login', get_stylesheet_directory_uri() . '/ANOTHERstyle-login.css' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );

    Thanks,
    R.

    • This topic was modified 7 years, 6 months ago by Rui Cruz. Reason: messed up code
    • This topic was modified 7 years, 6 months ago by Rui Cruz.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author twinpictures

    (@twinpictures)

    Hmm. Not really a collapse-o-matic question, but if you want to wp_enqueue_style multiple style sheets, you simply need to provide multiple handles like so:

    function my_login_stylesheet() {
        wp_enqueue_style( 'custom-login-one', get_stylesheet_directory_uri() . '/style-login.css' );
        wp_enqueue_style( 'custom-login-two', get_stylesheet_directory_uri() . '/ANOTHERstyle-login.css' );
    }
    add_action( 'login_enqueue_scripts', 'my_login_stylesheet' );
    
    Thread Starter Rui Cruz

    (@ruicruzpt)

    Hi,

    Thanks for your reply.
    Yes, I know it’s not a “direct” question, however it’s still related since I want to use your plugin with it. In fact, I already had half of the solution! ??

    In the case of your code, could you let me know what0s the path for the CSS file for your plugin so I can use it in the admin area? I assume it’s trigger fot the colaps/expand is done by CSS.

    Thanks,
    R.

    Plugin Author twinpictures

    (@twinpictures)

    OK, let’s back up a moment.
    You want to include the collapse-o-matic plugin on the WordPress registration page, for example: https://demo.spacedonkey.de/wp-login.php?action=register
    correct?

    If so, you need to do more than simply add the collapse-o-matic css. You also need to add jquery and the collapse-o-matic script. Have you checked out the CODEX on Customizing the Registration Form?

    Are you using any 3rd party plugin to customize the registration page, or are you doing this manually?

    Thread Starter Rui Cruz

    (@ruicruzpt)

    Hi,

    Yes, you are correct. I want to add this to that demo page.

    I am using Legacy – White label WordPress Admin Theme (paid plugin).

    Yes, I saw that page a while ago, but that’s a bit more dificult for me to do.
    I was hoping for a out-of-the-box way to add the plugin to the admin area.

    Plugin Author twinpictures

    (@twinpictures)

    OK, we’ll look into this and do some testing and get back to you with either a code snippet, or an update to the plugin. It will take a day or two as it’s a) a weekend, 2) motorcycle season and 3) not currently raining.

    Fret not, we’ll find a solution for you.

    Thread Starter Rui Cruz

    (@ruicruzpt)

    Sure, I’ll wait! ??

    Plugin Author twinpictures

    (@twinpictures)

    Regarding your theme:

    Legacy admin comes with Fully customizable Beautiful Login Screen theme. Also Control Top bar links, Customize Footer, Plugin access permissions, Login page customizing options etc. features help you to design web project (in WordPress) for your clients with your own company branding.

    If the login screen is ‘fully customizable’ then you might want to reach out to the theme support and ask how to include shortcodes on the login screen.
    This is probably your best bet.

    Thread Starter Rui Cruz

    (@ruicruzpt)

    Hi,

    Support for that plugin has been very litle, and I don’t think that if he is not willing to make all fields translated-ready (I had to edit plugin core files, uhg!) he’s not going to implement that.

    Also, if you dont mind, I’m thinking more like someone with a blank wordpress wp-register, without any plugins, to add for example “Rules” to the register field. When people click the rules, it will open a dropdown with the rules prior to the submit button. This could be usefull, with or without my wp admin theme. Actualy, that’s what I want to do with the plugin btw. ??

    Does it seem a good idea? Or do you feel that this could be usefull to other users?

    Plugin Author twinpictures

    (@twinpictures)

    We’ll look into this and get back to you in the next 2 hours.
    Please standby.

    Plugin Author twinpictures

    (@twinpictures)

    Good News! We have been able to successfully add the collapse-pro-matic plugin to the login/registration page. Here is a demo.
    We have added this as an option in the collapse-pro-matic options page. Please upgrade to the pro version and we’ll send you a release copy of the next version to ensure it works exactly as you require.

    Plugin Author twinpictures

    (@twinpictures)

    We’ll go ahead and mark this issue as resolved as we built the solution into the next version of Collapse-Pro-Matic.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Call Collapse-O-Matic to wp-register.php’ is closed to new replies.