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' );

Filter: wpbf_previous_post_link

Change the previous post link text on the post navigation.
Default: ← Previous Post

function your_prefix_custom_previous_post_link_text() {
	return 'Previous Post';
}
add_filter( 'wpbf_previous_post_link', 'your_prefix_custom_previous_post_link_text' );

Filter: wpbf_next_post_link

Change the next post link text on the post navigation.
Default: Next Post →

function your_prefix_custom_next_post_link_text() {
	return 'Next Post';
}
add_filter( 'wpbf_next_post_link', 'your_prefix_custom_next_post_link_text' );

Filter: wpbf_leave_comment

Change the “Leave a Comment” text on the comment form.
Default: Leave a Comment

function your_prefix_custom_leave_a_comment_text() {
	return 'Leave a Comment';
}
add_filter( 'wpbf_leave_comment', 'your_prefix_custom_leave_a_comment_text' );

Filter: wpbf_leave_reply

Change the “Leave a Reply” text on the comment form.
Default: Leave a Reply

function your_prefix_custom_leave_a_reply_text() {
	return 'Leave a Reply';
}
add_filter( 'wpbf_leave_reply', 'your_prefix_custom_leave_a_reply_text' );

Filter: wpbf_cancel_reply

Change the “Cancel Reply” text on the comment form.
Default: Cancel Reply

function your_prefix_custom_cancel_reply_text() {
	return 'Cancel Reply';
}
add_filter( 'wpbf_cancel_reply', 'your_prefix_custom_cancel_reply_text' );

Filter: wpbf_post_comment

Change the “Post Comment” text on the comment form.
Default: Post Comment

function your_prefix_custom_post_comment_text() {
	return 'Post Comment';
}
add_filter( 'wpbf_post_comment', 'your_prefix_custom_post_comment_text' );

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