Hello @bilemon, thanks for choosing Bento! There’s no such option in the theme settings at the moment, so this would require some code customzation (I recommend doing that via a child theme as otherwise it will be lost after a theme update). The php function you’re after is bento_get_custom_logo() in the main functions.php theme file. The last lines in that function build the actual HTML tags.
We will also add this as a potential feature into the theme’s backlog.
Hello @satoristudio and thanks for the reply. I will try to do this child theme, honestly, i’ve only learned the basics of wordpress just a week ago and not really a pro… so i hope to get more support from you guys, i’ll post my progress here so you can give me an advice if i’m on the right track. thanks again!
||Update||
I found an easy way to create a child theme called CTC and i also found the get_custom_logo in the functions.php
what and where should i add the lines of code so that i can change the header logo url? i apologize if this is too much to ask, i’ve really no idea about this.
// Filters
add_filter( ‘excerpt_more’, ‘bento_custom_excerpt_more’ );
add_filter( ‘get_custom_logo’, ‘bento_get_custom_logo’ );
add_filter( ‘get_the_excerpt’, ‘bento_grid_excerpt’ );
add_filter( ‘body_class’, ‘bento_extra_classes’ );
add_filter( ‘comment_form_fields’, ‘bento_rearrange_comment_fields’ );
add_filter( ‘post_class’, ‘bento_has_thumb_class’ );
add_filter( ‘get_the_archive_title’, ‘bento_cleaner_archive_titles’ );
add_filter( ‘cmb2_admin_init’, ‘bento_metaboxes’ );
add_filter( ‘dynamic_sidebar_params’, ‘bento_count_footer_widgets’, 50 );
-
This reply was modified 7 years, 4 months ago by
bilemon.
You need to create a new function in the child theme that will override the bento_get_custom_logo() in the parent by hooking it to get_custom_logo with a higher priority. That new function can simply return the HTML if you don’t need the other machinery from the original bento_get_custom_logo(), e.g.
add_filter( 'get_custom_logo', 'override_custom_logo', 5 );
override_custom_logo() {
return '<a href="https://homepage.com" class="logo-image-link"><img class="logo-fullsize" src="'.get_theme_mod( 'custom_logo' ).'"><img class="logo-mobile" src="'.get_theme_mod( 'custom_logo' ).'"></a>';
}
thanks, i’ll try it out!
||UPDATE||
Ah crap, for some reason our website had a roll back and the child theme i created yesterday disappeared in wordpress. the website and the original contents including the theme is intact. just the child theme is gone. i tried to install CTC again and was successful CTC Ok but when i tried to create the child them via the same process it failed (child theme failed)
called up the IT and seems like a permission settings issue. but he can only look it up next week.
is there a way to do this first on the parent theme functions.php? i can make a backup first just restore it later on and use the child theme and the lines of code you suggested that i add, once our IT is back.
thanks and looking forward.
-
This reply was modified 7 years, 4 months ago by
bilemon.