Pradeep Dabane
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: showing custom fields only on specific roles pagesHello Sacconi,
you need to add conditional check in your function before printing custom fields.
Check the below example, and adjust it accordingly
$user = wp_get_current_user(); if ( in_array( 'author', (array) $user->roles ) ) { //The user has the "author" role }
Forum: Developing with WordPress
In reply to: Change: You must be logged in to post a comment.If you are using custom theme or a page builder then it will differ so we need to know what theme or page builder are you using.
Forum: Developing with WordPress
In reply to: Change: You must be logged in to post a comment.You can use the following snippet to change the comment text, to add this snippet you can use code snippet plugin / or function.php file of child theme
add_filter( 'comment_form_defaults', function( $fields ) { $fields['must_log_in'] = sprintf( __( '<p class="must-log-in"> You must <a href="%s">SIGN UP</a> or <a href="%s">LOGIN</a> to post a comment.</p>' ), wp_registration_url(), wp_login_url( apply_filters( 'the_permalink', get_permalink() ) ) ); return $fields; });
you can adjust the code as per your requirement.
Hey Thomas,
Thanking you for replying,I am really sorry that it wasn’t clear problem statement.
I was expecting to apply membership discount on woocommerce other products which already have sale price with 10% discount.
What happening is When member get registered he gets 25% off(global PMPPro membership discount) on sale price which is already 10% off(applied using sale price on woocommerce product). What I want is is there any custom code to apply global PMPPro membership discount on woocommerce product’s regular price not on sale price?
I don’t know will it help to understand my problem? but if someone can help me that will solve my problem.
Thanking You,
Forum: Themes and Templates
In reply to: How to stop the header banner picture fading when moused overHappy to see this worked a bit.
If you can paste the link over here will be helpful.Forum: Themes and Templates
In reply to: how to change font in child theme to Google FontsHello,
Try searching on google fonts website,
then select to quick use copy @import code,
Paste it in your child theme’s css file at the top,
then use css rule from google font you choose to quick view,
add it in css file of your theme.May this help you
Forum: Themes and Templates
In reply to: How to stop the header banner picture fading when moused overopen up page in chrome right click and inspect the element (your picture)
above the style rules, you will see :hov which is mouse over event, toggle the event for your image (hover).
check the style applied for it and change it possibly opacity has been given to image/picture. change it to none.Hope this will help you.
Thanking You.Forum: Fixing WordPress
In reply to: how to change appearance of website.pm-button {
text-align: center;
}add this rule in your CSS, if you don’t have access to theme file make use of CSS editor within jetpack plugin.
will help you surely.
Thanking You.Forum: Themes and Templates
In reply to: [Zerif Lite] Change line color our teamOhhh, Happy enough for you!
Thanking You.Forum: Themes and Templates
In reply to: Apply function to specific page templateOhhh,
I missed it, you are using filter hook add_filter (‘add_to_cart_redirect‘, ‘redirect_to_checkout’);
which should be,
add_filter( ‘woocommerce_add_to_cart_redirect‘, ‘my_function_name’ );
The code will be like the same as above with changes,unction checkPageTemplate(){
$currentPost = get_post();
$pageTemplate = get_post_meta( $currentPost->ID, ‘_wp_page_template’, true );if ( $pageTemplate == “landing-page.php”) {
add_filter (‘woocommerce_add_to_cart_redirect’, ‘redirect_to_checkout’);
}
}
add_action( ‘the_post’, ‘checkPageTemplate’ );function redirect_to_checkout() {
global $woocommerce;
$checkout_url = $woocommerce->cart->get_checkout_url();
return $checkout_url;
}Hope this help you reply must… ??
Forum: Fixing WordPress
In reply to: 403 Forbidden Access to this resource on the server is denied!as u said u deleted .htaccess file, there is only one way that u can rewrite the .htaccess file is by setting permalinks. please ask to the admin to do it for you.
Forum: Themes and Templates
In reply to: [Zerif Lite] Change line color our teamupps,
i missed are u using 4n 1 as nth-child parameter. please check it.
other thing u can do is open web page in chrome right click on element u want to change the color, check the css rule chage it there and copy the whole css rule in css.
try this hope u solve the problem.Forum: Themes and Templates
In reply to: Apply function to specific page templatetry using filter hook inside if condition.
other solution is that get the page slug for the page you using this Template and then check for condition and apply filterForum: Themes and Templates
In reply to: [Zerif Lite] Change line color our teamtry using !important at the end of style rule to force the style u applied.
like:
background: ……….!important;
thanking you.Forum: Fixing WordPress
In reply to: 403 Forbidden Access to this resource on the server is denied!hello,
hope u have solved the problem, if not let me tell you, that after resetting everything you need to set permalink structure which will write .htaccess file again. which is necessary to work url structure properly.
the error u got is due to an improper .htaccess file or improper http response.
please let us know if error not resolved.
thanking you.