Skip to content

Instantly share code, notes, and snippets.

@ZellSnippets
Created February 7, 2014 04:09
Show Gist options
  • Save ZellSnippets/8857257 to your computer and use it in GitHub Desktop.
Save ZellSnippets/8857257 to your computer and use it in GitHub Desktop.
WP: Get common items like post title and categories
<?php
/**
* Gets user information
*/
$user_info = get_userdata($user_id); // returns the user class with standard items
$user_info = get_user_meta($user_id); // returns every single meta stored in the users table
/**
* Gets post title
*/
$post = get_post();
$title = strtolower($post->post_title);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment