Useful functions for wordpress