MemberPress Check active
add_action ( ‘template_redirect’, ‘redirect_custom_nonactive’ );function redirect_custom_nonactive(){if ( current_user_can(‘mepr-active’) && is_front_page() ) {echo ‘Welcome, active member user!’;}else { echo ‘Welcome, non-active registered user!’;} }
Swap Position of Items in li
jQuery( document ).ready( function(){$(‘#item2’).insertBefore(‘#item1’);});
Random Post in Related Post
function custom_pre_get_posts($wp_query) { $wp_query->set(‘orderby’, ‘rand’); $wp_query->set(‘order’, ‘ASC’); } add_action(‘pre_get_posts’, ‘custom_pre_get_posts’);
Paid Membership Pro Css Tweaks
form.pmpro_form .input, form.pmpro_form textarea, form.pmpro_form select, #loginform input[type=text], #loginform input[type=password] {display: block;max-width: 100%;width: 480px;margin: 0 auto; } form.pmpro_form label, #loginform label {font-weight: 700;display: block;margin: 0…
Change text with css and target a specific table row
.postid-{id} table td:nth-child(1) {color: #ffffff00;text-indent:-9999px; }.postid-{id} table td:nth-child(1):after{visibility: visible;color: rgb(35, 52, 82);float:left;text-indent:0;content: “Content here”;}
Add IPN and Return Url to PayPal
Here’s how to enable Auto Return: Click Settings. Click Website payments under “Product & Services” on the left of the page. Click Update next to “Website preferences.” Click On under “Auto return.” In…
How to get PayPal API username, password and signature information
You’ll need to create an API username for PayPal that’s different from your shopping cart’s username. You can access PayPal via API only if you…