-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Selecting a specific label #161
Labels
Comments
Hi @chris15326, Can you provide an example of the full snippet code you are using? |
Hey, thanks for coming back to me!
Yes, I basically used what your FAQ gave me as solution:
https://help.codesnippets.pro/article/46-how-can-i-make-a-snippet-run-on-only-a-certain-page
https://help.codesnippets.pro/article/42-can-i-run-my-snippet-on-just-one-page
For my two PHP snippets:
```php
if ( ! is_page( '/bestellen' ) ) return;
add_action( 'wfacp_internal_css', function () { ?>
<script>
window.addEventListener('load', function () {
(function ($) {
$(document.body).on('click', '.multi-cart-form .button',
function () {
setTimeout(function () {
$(document.body).trigger('update_checkout');
}, 1000);
});
})(jQuery);
});
</script>
<?php } );
```
```php
if ( ! is_page( '/bestellen' ) ) return;
add_action( 'wp_footer', function () {
?>
<script>
window.addEventListener('load', function () {
(function ($) {
function wfacp_scroll(){
$('html,body').animate({
scrollTop: $('#wfacp-e-form').offset().top
}, 1000);
}
$('#proA').on('click', function (e) {
e.preventDefault();
$('.wfacp_switcher_checkbox').eq(1).click();
wfacp_scroll();
});
$('#proB').on('click', function (e) {
e.preventDefault();
$('.wfacp_switcher_checkbox').eq(0).click();
wfacp_scroll();
});
$('#proC').on('click', function (e) {
e.preventDefault();
$('.wfacp_switcher_checkbox').eq(2).click();
wfacp_scroll();
});
})(jQuery);
});
</script>
<?php
} );
```
And for my CSS snippet:
add_action( 'wp_head', function () {
…
if ( ! is_page( [ 'Bestellen' ] ) ) {
return;
}
?>
<style>
.wpo-error-message
{
display: none!important;
}
.toggle-cross
{
background: black!important;
}
.wpo-image-button
{
border-radius: 0px!important;
}
.wpo-image-selected
{
border: none!important;
border-radius: 0px!important;
}
.wc-product-table
{
border-bottom: none!important;
}
/* diasable total and quantity */
.wpo-totals-container .wpo-error-message
{
display: none!important;
}
/* diasable total */
/* Disbale required symbol red star */
.wpo-field-required-symbol
{
display: none!important;
}
/* Disbale required symbol red star */
/* Image Button size */
.wpo-image-button
{
width: 80px!important;
}
/* Image Button size */
/* hide white space above image buttons in product tabel */
.wpo-option-name
{
margin-top: 10px!important;
margin-bottom: 20px!important;
display: non!important;
}
/* hide white space above image buttons in product tabel */
/* change image container width */
.wpo-image-butto
{
width: 50px;
}
/* change image container width */
/* grid settings for options */
.wpo-image-buttons
{
grid-gap: 10px!important;
grid-template-columns: auto auto auto auto!important;
flex-direction: row;
justify-content: flex-start;
}
/* grid settings for options */
/*center atc button 1 */
.wc-product-table-multi-form
{
width:100%;
display: flex;
justify-content: center;
}
/*center atc button 1 */
/*hide accordion white space top*/
.dataTables_wrapper
{margin-top: -58px!important;}
/*hide accordion white space top*/
/* button styling */
.btn
{
font-size: 21px!important;
letter-spacing: 3px!important;
transform: scale(1);
animation: pulse-black 2s infinite;
height: 55px!important;
background: red;
border-radius: 0px!important;
box-shadow: 0 0 0 0 red(0, 0, 0, 1);
}
.btn:hover{
animation: none;
background: red;
-webkit-box-shadow: 0px 8px 12px 5px rgba(255,0,0,0.26);
}
@Keyframes pulse-black {
0% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
}
70% {
transform: scale(1);
box-shadow: 0 0 0 10px rgba(0, 0, 0, 0);
}
100% {
transform: scale(0.95);
box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
}
}
/* button styling */
/* image border radius */
.wpo-image-button .wpo-image-wrap
.wpo-image-button .wpo-image-active
.wpo-image-button .wpo-image-wrap:after
.wpo-image-button .wpo-image-active
{
border-radius: 0px!important;
}
/* image border radius */
/* center option titles */
.wpo-option-name
{ width:110%;
display: flex;
justify-content: center; }
/* center option titles */
/* center image buttons */
.wpo-image-buttons
{
width:110%;
display: flex;
justify-content: center;
}
/* center image buttons */
/* hide checkbox */
.multi-cart-check
{
display: none!important;
}
/* hide checkbox */
</style>
<?php
} );
On Sat, Feb 25, 2023 at 3:41 AM Shea Bunge ***@***.***> wrote:
Hi @chris15326 <https://github.com/chris15326>,
Can you provide an example of the full snippet code you are using?
—
Reply to this email directly, view it on GitHub
<#161 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A5C3DKRJ7FVYSA5TW3HWISTWZFWOHANCNFSM6AAAAAATRUWIZE>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I want to select a label in order to edit / hide its content or just center it (it contains a text and an image).
The label is:
< label for=”payment_method_angelleye_ppcp” >
And I tried this in code snippets pro to address / select it, but nothing seems to work:
label[for=payment_method_angelleye_ppcp]
.label[for=payment_method_angelleye_ppcp]
label[for=”payment_method_angelleye_ppcp”]
.label[for=”payment_method_angelleye_ppcp”]
I’m happy for any suggestion or idea.
With kind regards and best wishes for the new year
Chris
The text was updated successfully, but these errors were encountered: