rinh
Forum Replies Created
-
Forum: Plugins
In reply to: [Create Block Theme] Need to add html data-theme=”dark”Works great, thank you!
Forum: Plugins
In reply to: [Gutenberg] Disable block inline CSS?Hi and thank you for your reply.
I don’t think I’d like to remove all of the CSS, but I should’ve provided some examples earlier to me more clear so I’ll do it now.
In this example I’d create two columns, that stack on smaller devices. In the left column I have a cover image with a min-height of 100 vh. If I set the height in the editor it’ll write it out with inline CSS like so:
<div class="wp-block-cover is-light" style="min-height:100vh">Then if I would for example like the height of the cover to be only 50vh instead of 100vh when the columns stack I can’t override it with custom CSS without also adding !important, because inline CSS have the highest priority. This applies to lots of block settings in the editor, like paddings, margins and so on.
I admit I got a little frustrated when I first noticed, but it’s not a major issue after all. My solution to it is to not use the block settings in the editor at all for blocks I know I’ll also add custom CSS for other devices.
I still think it would have been good if there was an option to prevent the editor to write inline CSS, so that custom CSS have higher priority.
I found a way around it as mentioned above so feel free to mark this as solved though.
Forum: Fixing WordPress
In reply to: Unable to get javascript to work in HTML blockI solved this issue by using another script. I think the other one had some issues, but still somehow worked out in Elementor.
Forum: Plugins
In reply to: [Gutenberg] Dynamic content/fields/tagsThank you very much, both of you, for the in-depth answer on this.
I don’t know what I did wrong last time I tried with shortcodes, but I decided to try again after reading your post and it works! Custom block sound like a great option too although perhaps beyond me, but I’ll look into it too.
With shortcodes working now the possibility is there to achieve this. Thank you again.
Thank you for checking. I use the Code Snippets plugin where I put PHP snippets.
Since it works for you I may need to try this on a staging site tomorrow to see if another snippet is causing problems. I have a snippet that dequeues Ultimate Member stylesheets. Perhaps that hides the error message.
Edit: After my reply I realised that it could be likely the error message is hidden because of my own CSS and it is! It makes no sense I did that, but it may have been a mistake. I can only apologise I bothered you about it again.
- This reply was modified 3 years, 7 months ago by rinh.
Wonderful, worked out really well.
Thank you again for all the help.
This worked great, thank you.
Is there a way to edit the message ‘An error has occured’ when putting in the wrong passcode, to something like ‘Please put in the correcct passcode’?
Also in the validate option for the field I put it to Unique Metakey value. I’m not sure I was supposed to do that or if there should be something else.
Thank you in advance.
I hadn’t seen that one, thank you!
From a quick look that seems to do exactly what I’m looking for. I’ll give it a try as soon as I can.
Thank you for the snippets!
In case anyone is looking for the same, I got help rewriting my redirect function so it can redirect users to custom URLs based on their roles.
function redirect_after_logout( $user_id ) { $current_user = get_user_by( 'id', $user_id ); $role_name = $current_user->roles[0]; if( $role_name == 'A_ROLE' ) { wp_safe_redirect( site_url( 'URL_WHERE_EVER_YOU_WANT_TO_REDIRECT' ) ); exit; } if( $role_name == 'ANOTHER_ROLE' ) { wp_safe_redirect( 'URL_WHERE_EVER_YOU_WANT_TO_REDIRECT' ); exit; } } add_action( 'wp_logout', 'redirect_after_logout' );That’s unfortunate, but thank you regardless.
I’ll be giving it a try. Thank you for the quick reply!
Worked great! Thank you so much.
Thank you!
I gave the plugin another go yesterday. In the end I feel happy using it, but if it stops working I’ll be sure to check out the function. Thanks again.
Hi, yes here’s an image of it. This is on WordPress Dashboard users.php page. Users with the list_users capability gets this dropdown. They’ll get a permission error trying to use it so it’s not a huge issue, just confusing.