How do i get a specific user metadata using custom metavalue outside of wordpress?

If you have billing_phone as user meta, which is the preferred way, that query would be incorrect. The advantage of utilizing custom user meta and adding a field for billing_phone would allow you to use get_users(). $user = get_users(‘meta_key’ => ‘billing_phone’, ‘meta_value’ => $phone_number, ‘fields’ => ‘ID’); The above would give you an array of … Read more

logged_in user outside of wordpress loop

this worked with root cookie: <?php define(‘WP_USE_THEMES’, false); if (file_exists(‘../books/wp-blog-header.php’)) { require_once(‘../books/wp-blog-header.php’); } else { echo ‘ERROR: blog header does not exist’; } global $current_user; get_currentuserinfo(); # Either load WordPress : http://codex.wordpress.org/Integrating_WordPress_with_Your_Website # or Manually define your url like… $cookieurl = “mybooksite.com”; define( ‘COOKIEHASH’, md5( $cookieurl ) ); $cookiename = “wordpress_logged_in_” . COOKIEHASH; $sitetitle=”Book Viewer”; … Read more

WordPress Footer Widget Processing

In your sidebar array as an example: register_sidebar(array( ‘id’ => ‘footer’, ‘name’ => ‘Footer’, ‘before_widget’ => ‘<div id=”%1$s” class=”widget col-sm-4 %2$s”>’, ‘after_widget’ => ‘</div>’, ‘before_title’ => ‘<h4 class=”widgettitle”>’, ‘after_title’ => ‘</h4>’, )); Don’t worry about wrapping the sidebar in a row. Let this do it for you. See, the col-sm-4 (or whatever size, with 4) … Read more

tech