Suppose you want to remove the bold page title from all pages of your site. This page title generally prints out under the header and before any loop. I'm going to show you 3 ways on how to achieve it.
First Idea ( Credit goes to the co-maintainer Tonya Mork )
beans_add_smart_action('beans_before_posts_loop', 'remove_page_title_on_pages_only' );
/**
* Remove the page title on pages.
*
* @since 1.0.0
*
* @return void
*/
function remove_page_title_on_pages_only() {
if ( is_singular() && is_page() ) {
remove_all_actions( 'beans_post_header' );
}
}
Second idea
/**
* Remove the page title on pages.
*
* @since 1.0.0
*
* @return void
*/
if ( is_singular() && is_page() ) {
beans_remove_action('beans_post_title');
}
Third idea
/**
* Remove the page title on pages.
*
* @since 1.0.0
*
* @return void
*/
if ( is_singular() && is_page() ) {
beans_modify_action_hook( 'beans_post_title', '__return_false' );
}