Forum Replies Created
-
AuthorPosts
-
ainaCMember
That is strange, It is just changing when I post… I tried again several times and I realized I forgot the if
if ( ! function_exists( 'catcheverest_header_left' ) ) :
So It is working!!! Thanks you again. But if you could look at the horizontal scrolling problem that would be great!!Thank you
ainaCMemberI am so sorry, I dont know what happened, again I pasted the wrong code in the post. The code under is the one I pasted in the function.php:
function catcheverest_header_left() { ?>
<div id=”header-left”>
<?php
// Check to see if the header image has been removed
global $_wp_default_headers;
$header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<h1 id=”site-logo”>” rel=”home”>
” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” />
</h1>
<div id=”hgroup” class=”with-logo”>
<?php else :
echo ‘<div id=”hgroup”>’;
endif; // end check for removed header image ?><h1 id=”site-title”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
<h2 id=”site-description”><?php bloginfo( ‘description’ ); ?></h2>
</div><!– #hgroup –>
</div><!– #header-left –><?php
}
endif; // catcheverest_header_leftadd_action( ‘catcheverest_hgroup_wrap’, ‘catcheverest_header_left’, 10 );
ainaCMembersorry, I pasted this code:
function register_my_menus() {
register_nav_menus(
array(
‘service’ => __( ‘Service’ ),
‘testimonials’ => __( ‘Testimonials’ )
)
);
}
add_action( ‘init’, ‘register_my_menus’ );function catcheverest_header_left() { ?>
<div id=”header-left”>
<?php
// Check to see if the header image has been removed
global $_wp_default_headers;
$header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<h1 id=”site-logo”>” rel=”home”>
” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” />
</h1>
<div id=”hgroup” class=”with-logo”>
<?php else :
echo ‘<div id=”hgroup”>’;
endif; // end check for removed header image ?><h1 id=”site-title”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
<h2 id=”site-description”><?php bloginfo( ‘description’ ); ?></h2>
</div><!– #hgroup –>
</div><!– #header-left –><?php
}
endif; // catcheverest_header_leftadd_action( ‘catcheverest_hgroup_wrap’, ‘catcheverest_header_left’, 10 );
BTW: could I ask you to see if you could find out why the page is going horizontally where it is no content?
ainaCMemberHi, well again this is what I have tried. I pasted this code in my fuctions.php:
function catcheverest_header_left() { ?>
<div id=”header-left”>
<?php
// Check to see if the header image has been removed
global $_wp_default_headers;
$header_image = get_header_image();
if ( ! empty( $header_image ) ) : ?>
<h1 id=”site-logo”>” rel=”home”>
” width=”<?php echo get_custom_header()->width; ?>” height=”<?php echo get_custom_header()->height; ?>” alt=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” />
</h1>
<div id=”hgroup” class=”with-logo”>
<?php else :
echo ‘<div id=”hgroup”>’;
endif; // end check for removed header image ?><h1 id=”site-title”>” title=”<?php echo esc_attr( get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo( ‘name’ ); ?></h1>
<h2 id=”site-description”><?php bloginfo( ‘description’ ); ?></h2>
</div><!– #hgroup –>
</div><!– #header-left –><?php
}
endif; // catcheverest_header_leftadd_action( ‘catcheverest_hgroup_wrap’, ‘catcheverest_header_left’, 10 );
and I get tis error:
Parse error: syntax error, unexpected ‘endif’ (T_ENDIF) in /customers/7/7/1/smcpurebuzz.com/httpd.www/news/wp-content/themes/mycatch/functions.php on line 88Even if I take it out again I get the same error. I have to upload the previous functions.php again to get the site up and running again. So I dont get what I am doing wrong. Do you have any suggestions? Please…
I was reading on one other post that you wrote a shorter code to remove the logo image link. So it is not any other code that could work?
thanks for your answer.
-
AuthorPosts