Tagged: Ajax Registration, css, stylesheet
I recently updated BuddyPress Ajax Registration and noticed that the styling suggestions had changed.
So I set up a theme subdirectory yourtheme/bpajaxr/assets/bpajaxr-style.css as indicated in the documentation for BuddyPress Ajax Registration, but the css file did not load.
I can enqueue the css file within functions.php in the usual way and it loads fine, but the documentation suggests that a specific directory tree is wanted — vs., say, just including the css in the theme’s style.css or anyplace within the child directory structure so long as it’s enqueued within functions.php.
Could you enlighten us as to why a specific theme subdirectory structure is suggested?
reference – https://buddydev.com/docs/buddypress-ajax-registration/overriding-modal-styles-from-theme/HI Diana,
Thank you for the question.The patch should be
yourtheme/bpajaxr/default/assets/bpajaxr-style.css
We suggest using
yourtheme/bpajaxr/default
The last part is name of the active template style(currently, we only support default but will change in future) to help us localize the change and add more styles in future without breaking backward compatibility.
Keeping this structure, you can keep your changes local to a specific style. Say, we add a new style “classic” in future, if you maintain this structure, changes for styles in the default won’t affect new.
Regards
BrajeshThank you Diana.
I am looking forward to it.Regards
BrajeshHi Diana,
You should not use !important. It is not needed for this plugin.
May I know here have you put the custom css file?Regards
BrajeshHi Brajesh,
I added a bunch more css and only had to use !important on some of them. I just got unlucky on the first few, I guess.
File is in
M:\Ampps\www\wp\wp-content\themes\customizr-child\bpajaxr\default
on my local drive. I have all the css done — I think — but the submit button isn’t working so far as I can determine. I tried just the login form and the wheely icon just spins & spins. I am going to set everything back to defaults and if it still doesn’t work, will upload to the host server to debug further.
Should I disable the enque, or leave it in?
wp_enqueue_style( 'bp-register-style', get_stylesheet_directory_uri() . '/bpajaxr/default/bpajaxr-style.css' );
Before this plugin was updated you had me use the following function in my functions.php:
function buddydev_login_load_ajaxr_styles() { wp_enqueue_style( 'bp-custom-ajaxr-1', get_stylesheet_directory_uri() . '/bp-ajax-register.css' ); } add_action( 'login_enqueue_scripts', 'buddydev_login_load_ajaxr_styles' ,11);
I thought perhaps that wasn’t needed with the plugin update and took it out. Perhaps that was a mistake.
Thank you for hanging in there with me. I must say, I was in complete despair before I found your BuddyPress registration plugin. The extra options and admin interface on the plugin are a lovely upgrade.
When I get things working, I’ll email you the css file. It’s 2-column and looks pretty sharp.
Diana
- This reply was modified 5 years, 8 months ago by Diana.
Hi Diana,
Thank you for the kind words.1. Please remove the enqueue statement.
2. Please name your css file ‘bpajaxr-style.css’ and put it in your
M:\Ampps\www\wp\wp-content\themes\customizr-child\bpajaxr\default\assets\
We need to create an assets directory inside the bpajaxr/default and put the css file there.
It will be loaded automatically and the original style won’t be loaded.
I am looking forward to see your implementation 🙂
Regards
BrajeshRegistration works with default styling; I was hiding one field I don’t want users to see but registration might gag without that. Possibly I can figure a way to appease the registration system without letting users see the BuddyPress “Name” field; I want it to be the same as the WordPress Username.
You must be logged in to reply to this topic.