Tagged: x
-
AuthorPosts
-
November 12, 2016 at 8:01 am #1254398
AntoineParticipantHello,
I’d like to change the text and the button of the protect block. How can I do it?
I’d like to change all the texts (“Restricted Content Login”, “Username” and “Password”) and the button.
Thank you.
November 12, 2016 at 1:50 pm #1254593
Nabeel AModeratorHi there,
Thanks for writing in! Please add the following jQuery script in your Customizer via Appearance > Customize > Custom > Edit Global Javascript
jQuery(document).ready(function($){ $('.h-protect').html("Change Title text"); $('.x-protect form div:nth-child(2) label').html("Change Username Text"); $('.x-protect form div:nth-child(3) label').html("Change Password Text"); $('.x-btn-protect').attr("value", "Change Btn Text"); });Change the text as per your need in the above code. Don’t forget to clear your browser’s cache after adding the code. Let us know how this goes!
November 12, 2016 at 2:43 pm #1254613
AntoineParticipantI did the trick, thank you.
How can I assign a class to the button so that I change its appearance?
November 12, 2016 at 3:21 pm #1254637
Nabeel AModeratorHi again,
Glad it worked. To assign a custom class to the button, just replace the previous code with this:
jQuery(document).ready(function($){ $('.h-protect').html("Change Title text"); $('.x-protect form div:nth-child(2) label').html("Change Username Text"); $('.x-protect form div:nth-child(3) label').html("Change Password Text"); $('.x-btn-protect').attr({"value": "Change Btn Text", "class": "btnClass"}); });Then you can use
.btnClassto style the button as per your need.Cheers!
November 12, 2016 at 6:27 pm #1254744
AntoineParticipantIt did the trick, thank you.
How can I assign a class to the button so that I change its appearance?
November 13, 2016 at 1:30 am #1254986
Rue NelModeratorHello There,
Thanks for updating in! If you want to display custom look for the button, you can add this custom css;
.btnClass{ /* add your styling here * like color, background color, borders and more */ }And to have more control over the protected block content element, you might be interested in checking out this thread: https://community.theme.co/forums/topic/restricted-content-can-i-add-a-forgot-password-link/#post-804483
Hope this helps.
November 13, 2016 at 3:34 am #1255047
AntoineParticipantThank you very much for the great support!
November 13, 2016 at 3:41 am #1255051
ChristopherModeratorYou’re welcome.
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1254398 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
