Filters

Filters let you replace certain elements like text strings in Page Builder Framework.


Navigation

Filter: wpbf_mobile_menu_text

This filter lets you replace the button text for the “Default” mobile menu.

function your_prefix_custom_mobile_menu_text() {
	return 'My Menu';
}
add_filter( 'wpbf_mobile_menu_text', 'your_prefix_custom_mobile_menu_text' );

404

Filter: wpbf_404_headline

This filter lets you change the headline for the 404 pages

function your_prefix_custom_404_headline() {
	return 'Nothing to see here!';
}
add_filter( 'wpbf_404_headline', 'your_prefix_custom_404_headline' );

Filter: wpbf_404_text

This filter lets you change the text for the 404 pages

function your_prefix_custom_404_text() {
	return 'Oops, something went wrong!';
}
add_filter( 'wpbf_404_text', 'your_prefix_custom_404_text );

Logo

Filter: wpbf_logo

This filter lets you change the main menu logo. In this example, we’re changing the logo on our website only for on a specific page.

function your_prefix_custom_logo( $custom_logo_url ) {
	if( is_page('193') ) {
		$custom_logo_url = 'https://ourwebsite.com/custom-logo.jpg';
	}
	return $custom_logo_url;
}
add_filter( 'wpbf_logo', 'your_prefix_custom_logo' );

Filter: wpbf_logo_mobile

This filter lets you change the mobile menu logo. In this example, we’re changing the logo on our website only for on a specific page, just as for the main menu logo above.

function your_prefix_custom_mobile_logo( $custom_logo_url ) {
	if( is_page('193') ) {
		$custom_logo_url = 'https://ourwebsite.com/custom-logo.jpg';
	}
	return $custom_logo_url;
}
add_filter( 'wpbf_logo_mobile', 'your_prefix_custom_mobile_logo' );

Search

Filter: wpbf_search_placeholder

This filter lets you change the placeholder text for the searchform.

function your_prefix_custom_search_form_placeholder() {
	return 'Search';
}
add_filter( 'wpbf_search_placeholder', 'your_prefix_custom_search_form_placeholder' );

Filter: wpbf_search_title

This filter lets you change the title text for the searchform.

function your_prefix_custom_search_form_title() {
	return 'Hit enter to search';
}
add_filter( 'wpbf_search_title', 'your_prefix_custom_search_form_title' );

Posts

Filter: wpbf_blog_post_thumbnail_size

This filter lets you change the featured image size on archive pages.
Default: full

function your_prefix_custom_blog_post_thumbnail_size() {
	return 'middle';
}
add_filter( 'wpbf_blog_post_thumbnail_size', 'your_prefix_custom_blog_post_thumbnail_size' );

Filter: wpbf_single_post_thumbnail_size

This filter lets you change the featured image size on posts.
Default: full

function your_prefix_custom_single_post_thumbnail_size() {
	return 'middle';
}
add_filter( 'wpbf_single_post_thumbnail_size', 'your_prefix_custom_single_post_thumbnail_size' );

Filter: wpbf_no_post_headline

This filter lets you change the headline that’s being displayed if no post could be found.
Default: Oops, this article couldn’t be found!

function your_prefix_custom_no_post_headline() {
	return 'Oops, nothing here!';
}
add_filter( 'wpbf_no_post_headline', 'your_prefix_custom_no_post_headline' );

Filter: wpbf_no_post_content

This filter lets you change the content that’s being displayed if no post could be found.
Default: Something went wrong.

function your_prefix_custom_no_post_content() {
	return 'We're bad at content.';
}
add_filter( 'wpbf_no_post_content', 'your_prefix_custom_no_post_content' );

Related articles

Page Builder Framework

A Page Builder’s best friend.

Sign up for the Newsletter

Get notified about the latest features and updates.

Join the Community