chciałbym w motywie Hueman wprowadzić zmianę odnoście tytułu strony i logo.
W tej chwili można na stronie głównej wprowadzić nazwę strony lub logo, a chciałbym żeby te dwie rzeczy były wyświetlone jednocześnie.
Jak można zmodyfikować kod, by było to możliwe?
Chodzi o stronę http://kosciannasygnale.pl/ która na razie wygląda tak:
a chciałbym żeby wyglądała mniej więcej tak:
Z góry dziękuję za pomoc!
Domyślam się że chodzi tu o kod Hueman: init-front.php (functions/init-front.php)
- Kod: Zaznacz cały
/* Site name/logo and tagline callbacks
/* ------------------------------------ */
//@utility used on front end and partial refresh
//@return string, either a textual or a logo imr src
function hu_get_logo_title( $is_mobile_menu = false ) {
// Text or image?
// Since v3.2.4, uses the WP 'custom_logo' theme mod option. Set with a filter.
$logo_src = false;
$is_logo_src_set = false;
$logo_or_title = hu_is_checked( 'display-header-title' ) ? get_bloginfo( 'name' ) : '';
// Do we have to display a logo ?
// Then, let's display the relevant one ( desktop or mobile ), if set
if ( apply_filters( 'hu_display_header_logo', hu_is_checked( 'display-header-logo' ) ) ) {
//if $is_mobile_menu, let's check if we have a specific logo for mobile set
if ( $is_mobile_menu ) {
$logo_src = hu_get_img_src_from_option( 'mobile-header-logo' );
$is_logo_src_set = false !== $logo_src && ! empty( $logo_src );
}
if ( ( $is_mobile_menu && ! $is_logo_src_set ) || ! $is_mobile_menu ) {
$logo_src = hu_get_img_src_from_option( 'custom-logo' );
$is_logo_src_set = false !== $logo_src && ! empty( $logo_src );
}
if ( $is_logo_src_set ) {
$logo_src = apply_filters( 'hu_header_logo_src' , $logo_src, $is_mobile_menu );
$logo_or_title = '<img src="'. $logo_src . '" alt="' . get_bloginfo('name'). '">';
}
}//if apply_filters( 'hu_display_header_logo', hu_is_checked( 'display-header-logo' )
return $logo_or_title;
}
if ( ! function_exists( 'hu_print_logo_or_title' ) ) {
function hu_print_logo_or_title( $echo = true, $is_mobile_menu = false ) {
$logo_or_title = hu_get_logo_title( $is_mobile_menu );
// => If no logo is set and ! hu_is_checked( 'display-header-title' ), the logo title is empty.
ob_start();
do_action( '__before_logo_or_site_title', $logo_or_title );
if ( ! empty( $logo_or_title ) ) {
?>
<p class="site-title"><?php hu_do_render_logo_site_tite( $logo_or_title ) ?></p>
<?php
}
do_action( '__after_logo_or_site_title', $logo_or_title );
$html = ob_get_contents();
if ($html) ob_end_clean();
if ( $echo )
echo apply_filters('hu_logo_title', $html );
else
return apply_filters('hu_logo_title', $html );
}
}
if ( ! function_exists( 'hu_do_render_logo_site_tite' ) ) {
function hu_do_render_logo_site_tite( $logo_or_title = null, $echo = true ) {
//typically, logo_or_title is not provided when partially refreshed from the customizer
if ( is_null( $logo_or_title ) || hu_is_ajax() ) {
$logo_or_title = hu_get_logo_title();
}
// => If no logo is set and ! hu_is_checked( 'display-header-title' ), the logo title is empty.
if ( ! empty( $logo_or_title ) ) {
if ( $echo ) {
printf( '<a class="custom-logo-link" href="%1$s" rel="home" title="%3$s">%2$s</a>',
home_url('/'),
$logo_or_title,
sprintf( '%1$s | %2$s', get_bloginfo('name') , __('Strona główna', 'hueman') )
);
} else {
return sprintf( '<a class="custom-logo-link" href="%1$s" rel="home" title="%3$s">%2$s</a>',
home_url('/'),
$logo_or_title,
sprintf( '%1$s | %2$s', get_bloginfo('name') , __('Strona główna', 'hueman') )
);
}
}
}
}
if ( ! function_exists( 'hu_render_blog_description' ) ) {
function hu_render_blog_description() {
echo get_bloginfo( 'description' );
}
}
/* Retro compat function for child theme users
/* ------------------------------------ */
if ( ! function_exists( 'hu_site_title' ) ) {
function hu_site_title() {
return hu_print_logo_or_title( false );
}
}
/* Page title
/* ------------------------------------ */
if ( ! function_exists( 'hu_get_page_title' ) ) {
function hu_get_page_title() {
global $post;
$heading = esc_attr( get_post_meta($post->ID,'_heading',true) );
$subheading = esc_attr( get_post_meta($post->ID,'_subheading',true) );
$title = $heading ? $heading: get_the_title();
if($subheading) {
$title = $title.' <span>'.$subheading.'</span>';
}
return $title;
}
}