This is simple stuff, but good code to keep handy. This covers all current major browsers and add backward compatibility for ie. The first number is horizontal shift (right is positive), 2nd number is verticle shift (down is positive), 3rd is radial blur and forth is, in this case hexadecimal color (#3d424d is a dark […]
For more code ideas go to my GitHub gists:
https://gist.github.com/johnnya23
Register Custom Post Type and Taxonomy
This is the standard code to register (create) a custom post type. For more detailed information on these and other options check out the WordPress Codex page. function register_post_types() { $labels = array( ‘name’ => _x( ‘Practitioners’, ‘themeblvd’ ), ‘singular_name’ => _x( ‘Practitioner’, ‘themeblvd’ ), ‘add_new’ => _x( ‘Add New’, ‘themeblvd’ ), ‘add_new_item’ => _x( […]
Sticky Posts in Category Pages
How do we get sticky posts to “stick” to category pages? The answer to this question turned out to be much more involved than I had imaged. After scouring the internet/codex I managed to found this solution. /* stickies to top for news category (34) */ function jma_child_sticky_posts_to_top($posts, $q) { //check to see if it’s […]
Check for Children
Want to be able to use one condition which includes or excludes pages based on weather they are children of a specific page? Add this code to functions.php: function is_kid( $pid,$includeparent = 0 ) { // $pid = The ID of the page we’re looking for pages underneath //$includeparent = 1 to include the parent […]