SQL order by fields
SELECT * FROM wp_posts WHERE ID IN (5,26,4) ORDER BY FIELD(ID,5,26,4)
jQuery( '.nav-primary .menu' ).children().each( function( index ){ jQuery( this ).children().not( 'ul' ).css({ 'float': 'left', 'padding-left': '0', 'padding-right': '0' }); }); jQuery( '.nav-primary .menu' ).css({ 'float': 'left' }); setTimeout( function(){ var wrap_width = jQuery( '.nav-primary .wrap' ).width(); var menu_width = jQuery( '.nav-primary .menu' ).width(); var remainder_width = parseInt( wrap_width ) – parseInt( menu_width ); var count_child…
Watch One Piece Episode 787 English Subbed below. Video is coming Soon!!!
How to get current product category slug? global $wp_query; echo $wp_query->query_vars['product_cat'];
function tml_title( $title, $action ) { if ( is_user_logged_in() ) { $user = wp_get_current_user; if ( 'profile' == $action ) $title = 'Your Profile'; else $title = sprintf( 'Welcome, %s', $user->display_name ); } else { switch ( $action ) { case 'register' : $title = 'Sign Up'; break; case 'lostpassword': case 'retrievepassword': case 'resetpass': case…
Gravity form user registration update confirmation redirect URL. How to set up your Gravity form user registration or user update profile to redirect to the Buddypress profile page? Using {user:user_nicename} will solve your problem. See image below on how to set up. Problem 1: I want my update profile form to redirect in my Buddypress…
# BODY CLASS ADD ONS add_filter('body_class', 'extra_body_class'); function extra_body_class($classes) { global $wp_query; // Add current slug on body class $current_id = $wp_query->post->ID; $post = get_post($current_id); $slug = $post->post_name; $classes[] = 'body-'.$slug; $classes[] = sanitize_html_class( str_replace( '.', '-', get_page_template_slug( $current_id ) ) ); return $classes; }