Remove Support for Certain PostTypes

Sometimes we don’t want certain features in the edit screen of  back end when we are in using custom post types or some times default post types.You can easily remove those by using the following code.

[php]
add_action( ‘init’, ‘spi_remove_posttype_supports’ );
function spi_remove_posttype_supports() {
remove_post_type_support(‘page’,’thumbnail’);//removes support for featured images in the page editor
remove_post_type_support(‘post’,’comments’); // removes support for comments in the post editor
}
[/php]

Ref: Remove PostType Supports

Changing Pagination Text

[php]
/* Adding Filter to change previous link text */
add_filter(‘genesis_prev_link_text’,’spi_prev_text’);

/* Adding Filter to change next link text */
add_filter(‘genesis_next_link_text’,’spi_next_text’);

function spi_prev_text() {
$link_text = ‘« Prev’;
return $link_text;
}

function spi_next_text() {
$link_text = ‘Next »’;
return $link_text;
}

[/php]

Styling Parent menu items using core WP classes

We were using   ‘wp_nav_menu_objects’ filter to add a parent class to menu items which have sub-items.But since WordPress 3.7 we no need to use that filter as  we have ready-made classes ‘.menu-item-has-children’ , ‘.page_item_has_children’ available in the core.

Continue reading Styling Parent menu items using core WP classes