Skip to content

Instantly share code, notes, and snippets.

<style>.row-fluid :first-child{margin-left: 0;}</style>
@trepmal
trepmal / get-usernames.php
Created April 4, 2013 19:38
get usernames from get_users()
<?php
$users = get_users();
$data = wp_list_pluck( $users, 'data' );
$usernames = wp_list_pluck( $data, 'user_login' );
print_r( $usernames );
<style>.row-fluid :first-child{margin-left: 0;}</style>
<h3>Welcome the most advanced WordPress theme based on twitter's Bootstrap</h3>
<center style="display: none;"><a href="http://shoestrap.org/downloads/shoestrap/"><img alt="" src="http://shoestrap.org/assets/shoestrap-newsletter-logo1.png" /></a></center>
An open-source WordPress theme that’s based on <a href="http://html5boilerplate.com/">HTML5 Boilerplate</a> and <a href="http://twitter.github.com/bootstrap/">Bootstrap from Twitter</a>. It is a fork of the amazing <a href="http://rootstheme.com/">Roots theme</a> with many customizations and additions, allowing you to use Wordpress's built-in theme customizer to control every aspect of your theme!
With a staggering total of more than 55 controls, you can easily change almost everything, from the number of sidebars to the color of your navbar and everything in between!
<center style="margin: 20px 0;"><span class="lead">To see all the settings available, you can </span><br />
<a class="btn btn-primary b
<?php
/**
* Return HTML for a single blog user for the widget.
*
* @uses apply_filters() Calls 'wpwhosonline_author_link' on the author link element
* @return string HTML for the user row
*/
function wpwhosonline_user( $last_online_ts, $user ) {
$avatar = get_avatar( $user->user_email, 32 );
$name = $user->display_name;
@michaelaguiar
michaelaguiar / functions.php
Created March 23, 2013 18:29
Wordpress XMLRPC Authentication from external app
<?php
add_filter('xmlrpc_methods', 'wpse39662_add_login_method');
function wpse39662_add_login_method($methods)
{
$methods['wpse39662.login'] = 'wpse39662_check_login';
return $methods;
}
function wpse39662_check_login($args)
@jameskoster
jameskoster / functions.php
Last active April 17, 2016 17:09
WooCommerce - Rename country
// Rename 'Republic of Ireland' to 'Ireland'
add_filter( 'woocommerce_countries', 'rename_ireland' );
function rename_ireland( $countries ) {
$countries['IE'] = 'Ireland';
return $countries;
}
/* #Media Queries
================================================== */
/* Smartphones (portrait and landscape) ----------- */
@media only screen and (min-width : 320px) and (max-width : 480px) {}
/* Smartphones (landscape) ----------- */
@media only screen and (min-width : 321px) {}
/* Smartphones (portrait) ----------- */
@jeffcdavis
jeffcdavis / include-wordpress.php
Created March 15, 2013 01:28
Load WordPress database/functions outside of WordPress
<?php
// Include WordPress
define('WP_USE_THEMES', false);
require('/website-root-directory/wp-load.php');
?>
@mattnorris
mattnorris / navbar-left-right.html
Created March 9, 2013 14:28
Left-justified Twitter Bootstrap nav options along with right-justified; collapsible menu for mobile devices is also illustrated.
<!--
Navbar
Source: http://twitter.github.com/bootstrap/
-->
<div class="navbar navbar-inverse navbar-fixed-top">
<div class="navbar-inner">
<div class="container-fluid">
<!-- Expand button for smaller devices -->
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
<span class="icon-bar"></span>