Get all posts in RSS

Codex has example snippet on how to use post_limits filter to override amount set in admin for feed. if (isset ($query->query_vars[‘feed’]) and ($query->query_vars[‘feed’] == ‘ics’)) add_filter(‘post_limits’,’__return_empty_string’); http://codex.wordpress.org/Function_Reference/query_posts#Usage_Tips

Get page permalink without wpurl

There’s nothing built in to return the bit you want but it should be as easy as using the home_url() function and removing it’s output from the full url eg: function get_relative_permalink( $url ) { return str_replace( home_url(), “”, $url ); }

Get multiple roles with get_users

Fastforward to WordPress 4.4 – it will support the role__in attribute! It looks like WordPress 4.4 is our lucky version number, because it will support both the role__in and role__not_in attributes of the WP_User_Query class. So to include the subscriber, contributor and author roles, we can simply use: $users = get_users( [ ‘role__in’ => [ … Read more

Add an alignment option for images

I agree with david-binda – great question! I’ve run in to this problem on a number of occasions and come up with a solution that works pretty well. While I do like the idea of adding a shortcode to insert the image with classes as suggested by pavlos-bizimis I don’t think it really solves the … Read more