![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/d064108d7d356f0daa23d3180efd1fa9-87a1c39.jpg)
Hi everybody,
What would be the best approach to replace the default "Whoops, ...." phrase and the search bar with custom content?
Thanks in advance Marcel
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/33c0c89b33766ce0d5b4996cf7ad2dec-87a1c39.jpg)
Filter the original text with another translable text.
Put this code somewhere in your functions.php
file.
// Add filter with anonymous function.
beans_add_filter(
'beans_no_post_article_title_text_output',
__( 'Your awesome text to display if no post are shown', 'your-text-domain' )
);
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/d064108d7d356f0daa23d3180efd1fa9-87a1c39.jpg)
Hi Joseph,
thanks for your reply. I already figured out how to change the output text, but I'm looking for a method to remove the headline and more importantly remove the search form because in this case it's not needed.
I've already tried
beans_remove_action( 'beans_post_title' );
and
beans_remove_action( 'beans_post_header' );
in my custom post type template but it didn't work and since the search form has no beans data-markup-id, I have no clue how to approach the problem.
Any other suggestions?
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/ee0464443fa9842713a735791bbea859-87a1c39.jpg)
Now i understand.
Every part of Beans contains a callback, the post title, the post content, the comment title, the loop, etc... With the Markup API you can modify a single markup, but with Actions API you can modify a part of the theme or maybe entire theme.
Create a new function to replace the default beans_no_post()
. Then tell the action to call your new function instead of beans_no_post()
.
beans_modify_action_callback( 'beans_no_post', 'my_new_no_post' );
/*
* New callback template to replace the default 'beans_no_post'.
*/
function my_new_no_post() {
// Your code goes here.
}
![](https://beanscommunity.wpenginepowered.com/wp-content/uploads/beans/images/d064108d7d356f0daa23d3180efd1fa9-87a1c39.jpg)
that's indeed working like a charm. Thanks a lot!