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 […]