Custom hyperlink for header logo in evolve
-
My searching has not solved this question so all help greatly appreciated I have added a custom logo to my header. I need to link to something other than my home page – it needs to link to another site. How can I accomplish this. Please help!
Thanks
Sue
-
Hi there,
Thanks for writing in,
Could you please provide the URL of your website which will make it a much easier to assist you. However provide more clarification in concern of what do you need to link with the some other website.
Please also provide us with some screenshots so we can get into details.
Thanks.
The site is at https://riverrosecruises.com.c11.previewyoursite.com/. You will see a red banner across the top “Book online…” This is added through the theme evolve as a header/custom logo. I need the hyperlink for this image to take the user to the reservations page, not the home page as it currently does. (I embedded the other website on this page so now the link needs to go to a page within the same website) If necessary the link associated with the title of the site could also go to this page. I would really appreciate any assistance with this. I know it can be done I just don’t have the experience to do it.
Thanks!
Hi there,
If you wish to direct the top red banner image towards the reservations page you can achieve that by getting into your index.php HTML file where the anchor tag is not written correctly as it should be for the sake of true outcome and let you transfer towards reservations page.
You should go into your HTML file and edit the anchor tag and replace that by this one below:
<a href="https://riverrosecruises.com.c11.previewyoursite.com/?page_id=170"><img id="logo-image" class="img-responsive" src="https://riverrosecruises.com.c11.previewyoursite.com/wp-content/uploads/2015/04/Zerve-Banner2.gif"></a>
Hope this helps!
Thanks.
How can I change the HTML file – where is it located? I have used FireBug and can see where it is there but how do I change it in the site coding. I looked at the index.php but can’t see where to change it.
Really appreciate your attempt to help – this is a major stumbling block for me on this site!
Hi there,
Once you get entered into your index.php HTML file you can search the code under: Home Page > wrapper > header > container > then right under the “righttopcolumn” there is an anchor tag you have to copy paste that with this new code below:
<a href="https://riverrosecruises.com.c11.previewyoursite.com/?page_id=170"><img id="logo-image" class="img-responsive" src="https://riverrosecruises.com.c11.previewyoursite.com/wp-content/uploads/2015/04/Zerve-Banner2.gif"></a>
You can also have a look into this screenshot which is directing you towards the steps and HTML classes:
Hope this helps!
Thanks.
I do appreciate your help but there is no index.php HTLM file and there is nothing in the index.php that resembles html that I can find. here is the code for the index.php. I have used firebug and can find the link in the html that the code creates but I see no way to edit it on the site. (It is my understanding that the php is creating the html when a site is opened and that there is not really an html file to edit – though I could be wrong and would love to be.)
<?php /** * Template: Index.php * * @package EvoLve * @subpackage Template */ get_header(); ?> <?php $xyz = ""; $evolve_layout = evolve_get_option('evl_layout','2cl'); $evolve_post_layout = evolve_get_option('evl_post_layout','two'); $evolve_nav_links = evolve_get_option('evl_nav_links','after'); $evolve_header_meta = evolve_get_option('evl_header_meta','single_archive'); $evolve_category_page_title = evolve_get_option('evl_category_page_title','1'); $evolve_excerpt_thumbnail = evolve_get_option('evl_excerpt_thumbnail','0'); $evolve_share_this = evolve_get_option('evl_share_this','single'); $evolve_post_links = evolve_get_option('evl_post_links','after'); $evolve_similar_posts = evolve_get_option('evl_similar_posts','disable'); $evolve_featured_images = evolve_get_option('evl_featured_images','1'); $evolve_thumbnail_default_images=evolve_get_option('evl_thumbnail_default_images','0'); $evolve_posts_excerpt_title_length=intval(evolve_get_option('evl_posts_excerpt_title_length','40')); $evolve_blog_featured_image = evolve_get_option('evl_blog_featured_image','0'); if (($evolve_layout == "1c")) { ?> <?php } else { ?> <?php $options = get_option('evolve'); if((is_page() || is_single()) && get_post_meta($post->ID, 'evolve_full_width', true) == 'yes'): else: if ($evolve_layout == "3cm" || $evolve_layout == "3cl" || $evolve_layout == "3cr") { ?> <?php get_sidebar('2'); ?> <?php } ?> <?php endif; ?> <?php } ?> <!--BEGIN #primary .hfeed--> <div id="primary" class="<?php if ($evolve_layout == "1c") {echo ' col-md-12';} else {echo ' col-xs-12 col-sm-6'; if (($evolve_layout == "2cr" && ($evolve_post_layout == "two") || $evolve_layout == "2cl" && ($evolve_post_layout == "two"))) { echo ' col-md-8';} if (($evolve_layout == "3cm" || $evolve_layout == "3cl" || $evolve_layout == "3cr")) {echo ' col-md-6';} else {echo ' col-md-8'; } if ( is_single() || is_page() ) { echo ' col-single'; } } ?> <?php $content_css = ''; if(class_exists('Woocommerce') || (get_post_meta($post->ID, 'evolve_full_width', true) == 'yes')): if((get_post_meta($post->ID, 'evolve_full_width', true) == 'yes') || is_cart() || is_checkout() || is_account_page() || (get_option('woocommerce_thanks_page_id') && is_page(get_option('woocommerce_thanks_page_id')))) { $content_css = ' full-width'; } echo $content_css; endif;?>"> <?php $evolve_breadcrumbs = evolve_get_option('evl_breadcrumbs','1'); if ($evolve_breadcrumbs == "1"): if (is_home() || is_front_page()): elseif ((is_single() && get_post_meta($post->ID, 'evolve_page_breadcrumb', true) == 'no') || (is_page() && get_post_meta($post->ID, 'evolve_page_breadcrumb', true) == 'no')): else:evolve_breadcrumb(); endif; endif; ?> <!-- attachment begin --> <?php if (is_attachment()) { ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <!--BEGIN .hentry--> <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); ?>"> <?php $options = get_option('evolve'); if (($evolve_header_meta == "") || ($evolve_header_meta == "single_archive")) { ?> <h1 class="entry-title"><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment" class="attach-font"><?php echo get_the_title($post->post_parent); ?></a> » <?php if ( get_the_title() ){ the_title(); } ?></h1> <!--BEGIN .entry-meta .entry-header--> <div class="entry-meta entry-header"> <a href="<?php the_permalink() ?>"><span class="published updated"><?php the_time(get_option('date_format')); ?></span></a> <?php if ( comments_open() ) : ?> <span class="comment-count"><?php comments_popup_link( __( 'Leave a Comment', 'evolve' ), __( '1 Comment', 'evolve' ), __( '% Comments', 'evolve' ) ); ?></span> <?php else : // comments are closed endif; ?> <span class="author vcard"> <?php $evolve_author_avatar = evolve_get_option('evl_author_avatar','0'); if ($evolve_author_avatar == "1") { echo get_avatar( get_the_author_meta('email'), '30' ); } ?> <?php _e( 'By', 'evolve' ); ?> <strong><?php printf( '<a class="url fn" href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( 'View all posts by %s', $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></strong></span> <?php edit_post_link( __( 'edit', 'evolve' ), '<span class="edit-post">', '</span>' ); ?> <!--END .entry-meta .entry-header--> </div> <?php } else { ?> <h1 class="entry-title"><a href="<?php echo get_permalink($post->post_parent); ?>" rev="attachment"><?php echo get_the_title($post->post_parent); ?></a> » <?php the_title(); ?></h1> <?php if ( current_user_can( 'edit_post', $post->ID ) ): ?> <?php edit_post_link( __( 'EDIT', 'evolve' ), '<span class="edit-post edit-attach">', '</span>' ); ?> <?php endif; ?> <?php } ?> <!--BEGIN .entry-content .article--> <div class="entry-content article"> <?php if ( wp_attachment_is_image() ) : $attachments = array_values( get_children( array( 'post_parent' => $post->post_parent, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => 'ASC', 'orderby' => 'menu_order ID' ) ) ); foreach ( $attachments as $k => $attachment ) { if ( $attachment->ID == $post->ID ) break; } $k++; // If there is more than 1 image attachment in a gallery if ( count( $attachments ) > 1 ) { if ( isset( $attachments[ $k ] ) ) // get the URL of the next image attachment $next_attachment_url = get_attachment_link( $attachments[ $k ]->ID ); else // or get the URL of the first image attachment $next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID ); } else { // or, if there's only 1 image attachment, get the URL of the image $next_attachment_url = wp_get_attachment_url(); } ?> <p class="attachment" align="center"><a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" class="single-gallery-image"><?php echo wp_get_attachment_image( $post->ID, $size='medium' ); // filterable image width with, essentially, no limit for image height. ?></a></p> <div class="navigation-links single-page-navigation clearfix row"> <div class="col-sm-6 col-md-6 nav-previous"><?php previous_image_link ( false, '<div class="btn btn-left icon-arrow-left icon-big">Previous Image</div>' ); ?></div> <div class="col-sm-6 col-md-6 nav-next"><?php next_image_link ( false, '<div class="btn btn-right icon-arrow-right icon-big">Next Image</div>' ); ?></div> <!--END .navigation-links--> </div> <?php else : ?> <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a> <?php endif; ?> <div class="entry-caption"><?php if ( !empty( $post->post_excerpt ) ) the_excerpt(); ?></div> <!--END .entry-content .article--> <div class="clearfix"></div> </div> <!--END .hentry--> </div> <?php $options = get_option('evolve'); if (($evolve_share_this == "single_archive") || ($evolve_share_this == "all")) { evolve_sharethis(); } else { ?> <div class="margin-40"></div> <?php }?> <?php comments_template( '', true ); ?> <?php endwhile; else : ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Not Found', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <p><?php _e( 'Sorry, no attachments matched your criteria.', 'evolve' ); ?></p> <!--END .entry-content--> </div> <!--END #post-0--> </div> <!-- attachment end --> <?php endif; ?> <!-- single post begin --> <?php } elseif (is_single()) { ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <?php $options = get_option('evolve'); if (($evolve_post_links == "before") || ($evolve_post_links == "both")) { ?> <span class="nav-top"> <?php get_template_part( 'navigation', 'index' ); ?> </span> <?php } ?> <!--BEGIN .hentry--> <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); ?> col-md-12"> <?php $options = get_option('evolve'); if (($evolve_header_meta == "") || ($evolve_header_meta == "single") || ($evolve_header_meta == "single_archive")) { ?> <?php if(get_post_meta($post->ID, 'evolve_page_title', true) == 'no'): else: ?> <h1 class="entry-title"><?php if ( get_the_title() ){ the_title(); } ?></h1> <?php endif; ?> <!--BEGIN .entry-meta .entry-header--> <div class="entry-meta entry-header"> <a href="<?php the_permalink() ?>"><span class="published updated"><?php the_time(get_option('date_format')); ?></span></a> <?php if ( comments_open() ) : ?> <span class="comment-count"><?php comments_popup_link( __( 'Leave a Comment', 'evolve' ), __( '1 Comment', 'evolve' ), __( '% Comments', 'evolve' ) ); ?></span> <?php else : // comments are closed endif; ?> <span class="author vcard"> <?php $evolve_author_avatar = evolve_get_option('evl_author_avatar','0'); if ($evolve_author_avatar == "1") { echo get_avatar( get_the_author_meta('email'), '30' ); } ?> <?php _e( 'Written by', 'evolve' ); ?> <strong><?php printf( '<a class="url fn" href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( 'View all posts by %s', $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></strong></span> <?php edit_post_link( __( 'edit', 'evolve' ), '<span class="edit-post">', '</span>' ); ?> <!--END .entry-meta .entry-header--> </div> <?php } else { ?> <?php if(get_post_meta($post->ID, 'evolve_page_title', true) == 'yes') : ?> <h1 class="entry-title"><?php the_title(); ?></h1> <?php endif; ?> <?php if ( current_user_can( 'edit_post', $post->ID ) ): ?> <?php edit_post_link( __( 'EDIT', 'evolve' ), '<span class="edit-post edit-attach">', '</span>' ); ?> <?php endif; ?> <?php } ?> <?php if($evolve_blog_featured_image == "1" && has_post_thumbnail()) { echo '<span class="thumbnail-post-single">'; the_post_thumbnail('post-thumbnail'); echo '</span>'; } ?> <!--BEGIN .entry-content .article--> <div class="entry-content article"> <?php the_content( __('READ MORE »', 'evolve' ) ); ?> <?php wp_link_pages( array( 'before' => '<div id="page-links"><p>' . __( '<strong>Pages:</strong>', 'evolve' ), 'after' => '</p></div>' ) ); ?> <!--END .entry-content .article--> <div class="clearfix"></div> </div> <!--BEGIN .entry-meta .entry-footer--> <div class="entry-meta entry-footer row"> <div class="col-md-6"> <?php if ( evolve_get_terms( 'cats' ) ) { ?> <div class="entry-categories"> <?php echo evolve_get_terms( 'cats' ); ?></div> <?php } ?> <?php if ( evolve_get_terms( 'tags' ) ) { ?> <div class="entry-tags"> <?php echo evolve_get_terms( 'tags' ); ?></div> <?php } ?> <!--END .entry-meta .entry-footer--> </div> <div class="col-md-6"> <?php $options = get_option('evolve'); if (($evolve_share_this == "") || ($evolve_share_this == "single") || ($evolve_share_this == "single_archive") || ($evolve_share_this == "all")) { evolve_sharethis(); } else { ?> <div class="margin-40"></div> <?php }?> </div> </div> <!-- Auto Discovery Trackbacks <?php trackback_rdf(); ?> --> <!--END .hentry--> </div> <?php $options = get_option('evolve'); if (($evolve_similar_posts == "") || ($evolve_similar_posts == "disable")) {} else { evolve_similar_posts(); } ?> <?php $options = get_option('evolve'); if (($evolve_post_links == "") || ($evolve_post_links == "after") || ($evolve_post_links == "both")) { ?> <?php get_template_part( 'navigation', 'index' ); ?> <?php } ?> <?php comments_template( '', true ); ?> <?php endwhile; else : ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Not Found', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'evolve' ); ?></p> <?php get_search_form(); ?> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php endif; ?> <!-- single post end --> <!-- home/date/category/tag/search/author begin --> <?php } elseif (is_home() || is_date() || is_category() || is_tag() || is_search() || is_author()) { ?> <!-- 2 or 3 columns begin --> <?php if (is_date()) { ?> <?php /* If this is a daily archive */ if ( is_day() ) { ?> <h2 class="page-title archive-title"><?php _e( 'Daily archives for', 'evolve' ); ?> <span class="daily-title updated"><?php the_time( 'F jS, Y' ); ?></span></h2> <?php /* If this is a monthly archive */ } elseif ( is_month() ) { ?> <h2 class="page-title archive-title"><?php _e( 'Monthly archives for', 'evolve' ); ?> <span class="monthly-title updated"><?php the_time( 'F, Y' ); ?></span></h2> <?php /* If this is a yearly archive */ } elseif ( is_year() ) { ?> <h2 class="page-title archive-title"><?php _e( 'Yearly archives for', 'evolve' ); ?> <span class="yearly-title updated"><?php the_time( 'Y' ); ?></span></h2> <?php } ?> <?php } elseif (is_category() && $evolve_category_page_title) { ?> <h2 class="page-title archive-title"><?php _e( 'Posts in category', 'evolve' ); ?> <span id="category-title"><?php single_cat_title(); ?></span></h2> <?php } elseif (is_tag()) { ?> <h2 class="page-title archive-title"><?php _e( 'Posts tagged', 'evolve' ); ?> <span id="tag-title"><?php single_tag_title(); ?></span></h2> <?php } elseif (is_search()) { ?> <h2 class="page-title search-title"><?php _e( 'Search results for', 'evolve' ); ?> <?php echo '<span class="search-term">'.the_search_query().'</span>'; ?></h2> <?php } elseif (is_author()) { ?> <h2 class="page-title archive-title"><?php _e( 'Posts by', 'evolve' ); ?> <span class="author-title"><?php the_post(); echo $authordata->display_name; rewind_posts(); ?></span></h2> <?php } ?> <?php $options = get_option('evolve'); if ($evolve_post_layout == "two" || $evolve_post_layout == "three") { ?> <?php if (($evolve_nav_links == "before") || ($evolve_nav_links == "both")) { ?> <span class="nav-top"> <?php get_template_part( 'navigation', 'index' ); ?> </span> <?php } else {?> <?php } ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <!--BEGIN .hentry--> <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); if ($evolve_post_layout == "two") { echo ' col-md-6 odd'.($xyz++%2); } else { echo ' col-md-4 odd'.($xyz++%3); } ?> <?php if (has_post_format( array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'),'')) { echo 'formatted-post'; } ?> margin-40"> <?php $options = get_option('evolve'); if (($evolve_header_meta == "") || ($evolve_header_meta == "single_archive")) { ?> <h2 class="entry-title"> <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php if ( get_the_title() ){ $title = the_title('', '', false); echo evolve_truncate($title, $evolve_posts_excerpt_title_length, '...'); } ?></a> </h2> <!--BEGIN .entry-meta .entry-header--> <div class="entry-meta entry-header"> <a href="<?php the_permalink() ?>"><span class="published updated"><?php the_time(get_option('date_format')); ?></span></a> <span class="author vcard"> <?php _e( 'Written by', 'evolve' ); ?> <strong><?php printf( '<a class="url fn" href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( 'View all posts by %s', $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></strong></span> <?php edit_post_link( __( 'edit', 'evolve' ), '<span class="edit-post">', '</span>' ); ?> <!--END .entry-meta .entry-header--> </div> <?php } else { ?> <h1 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"> <?php if ( get_the_title() ){ $title = the_title('', '', false); echo evolve_truncate($title, 40, '...'); } ?></a> </h1> <?php if ( current_user_can( 'edit_post', $post->ID ) ): ?> <?php edit_post_link( __( 'EDIT', 'evolve' ), '<span class="edit-post edit-attach">', '</span>' ); ?> <?php endif; ?> <?php } ?> <!--BEGIN .entry-content .article--> <div class="entry-content article"> <?php if ($evolve_featured_images == "1") { ?> <?php if(has_post_thumbnail()) { echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo '">';the_post_thumbnail('post-thumbnail'); echo ' <div class="mask"> <div class="icon"></div> </div> </a></span>'; } else { $image = evolve_get_first_image(); if ($image): echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo'"><img src="'.$image.'" alt="';the_title();echo'" /> <div class="mask"> <div class="icon"></div> </div> </a></span>'; else: if($evolve_thumbnail_default_images==0) { echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo'"><img src="'.get_template_directory_uri().'/library/media/images/no-thumbnail.jpg" alt="';the_title();echo'" /> <div class="mask"> <div class="icon"></div> </div> </a></span>'; } endif; } ?> <?php } ?> <?php the_excerpt(); ?> <div class="entry-meta entry-footer"> <div class="read-more btn btn-right icon-arrow-right"> <a href="<?php the_permalink(); ?>"><?php _e('READ MORE', 'evolve' ); ?></a> </div> <?php if ( comments_open() ) : ?> <span class="comment-count"><?php comments_popup_link( __( 'Leave a Comment', 'evolve' ), __( '1 Comment', 'evolve' ), __( '% Comments', 'evolve' ) ); ?></span> <?php else : // comments are closed endif; ?> </div> <!--END .entry-content .article--> <div class="clearfix"></div> </div> <!--END .hentry--> </div> <?php $i='';$i++; ?> <?php endwhile; ?> <?php get_template_part( 'navigation', 'index' ); ?> <?php else : ?> <?php if (is_search()) { ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Your search for', 'evolve' ); ?> "<?php echo the_search_query(); ?>" <?php _e( 'did not match any entries', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <br /> <p><?php _e( 'Suggestions:', 'evolve' ); ?></p> <ul> <li><?php _e( 'Make sure all words are spelled correctly.', 'evolve' ); ?></li> <li><?php _e( 'Try different keywords.', 'evolve' ); ?></li> <li><?php _e( 'Try more general keywords.', 'evolve' ); ?></li> </ul> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php } else { ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Not Found', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'evolve' ); ?></p> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php } ?> <?php endif; ?> <!-- 2 or 3 columns end --> <!-- 1 column begin --> <?php } else { ?> <?php if (($evolve_nav_links == "before") || ($evolve_nav_links == "both")) { ?> <span class="nav-top"> <?php get_template_part( 'navigation', 'index' ); ?> </span> <?php } else {?> <?php } ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <!--BEGIN .hentry--> <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); ?> <?php if (has_post_format( array('aside', 'audio', 'chat', 'gallery', 'image', 'link', 'quote', 'status', 'video'),'') || is_sticky()) { echo 'formatted-post formatted-single margin-40'; } ?>"> <?php if (($evolve_header_meta == "") || ($evolve_header_meta == "single_archive")) { ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php if ( get_the_title() ){ the_title();} ?></a></h1> <!--BEGIN .entry-meta .entry-header--> <div class="entry-meta entry-header"> <a href="<?php the_permalink() ?>"><span class="published updated"><?php the_time(get_option('date_format')); ?></span></a> <?php if ( comments_open() ) : ?> <span class="comment-count"><a href="<?php comments_link(); ?>"><?php comments_popup_link( __( 'Leave a Comment', 'evolve' ), __( '1 Comment', 'evolve' ), __( '% Comments', 'evolve' ) ); ?></a></span> <?php else : // comments are closed endif; ?> <span class="author vcard"> <?php $evolve_author_avatar = evolve_get_option('evl_author_avatar','0'); if ($evolve_author_avatar == "1") { echo get_avatar( get_the_author_meta('email'), '30' ); } ?> <?php _e( 'Written by', 'evolve' ); ?> <strong><?php printf( '<a class="url fn" href="' . get_author_posts_url( $authordata->ID, $authordata->user_nicename ) . '" title="' . sprintf( 'View all posts by %s', $authordata->display_name ) . '">' . get_the_author() . '</a>' ) ?></strong></span> <?php edit_post_link( __( 'edit', 'evolve' ), '<span class="edit-post">', '</span>' ); ?> <!--END .entry-meta .entry-header--> </div> <?php } else { ?> <h1 class="entry-title"><a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php if ( get_the_title() ){ the_title();} ?></a></h1> <?php if ( current_user_can( 'edit_post', $post->ID ) ): ?> <?php edit_post_link( __( 'EDIT', 'evolve' ), '<span class="edit-post edit-attach">', '</span>' ); ?> <?php endif; ?> <?php } ?> <!--BEGIN .entry-content .article--> <div class="entry-content article"> <?php if ($evolve_featured_images == "1") { ?> <?php if(has_post_thumbnail()) { echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo '">';the_post_thumbnail('post-thumbnail'); echo ' <div class="mask"> <div class="icon"></div> </div> </a></span>'; } else { $image = evolve_get_first_image(); if ($image): echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo'"><img src="'.$image.'" alt="';the_title();echo'" /> <div class="mask"> <div class="icon"></div> </div> </a></span>'; else: if($evolve_thumbnail_default_images==0) { echo '<span class="thumbnail-post"><a href="'; the_permalink(); echo'"><img src="'.get_template_directory_uri().'/library/media/images/no-thumbnail.jpg" alt="';the_title();echo'" /> <div class="mask"> <div class="icon"></div> </div> </a></span>'; } endif; } ?> <?php } ?> <?php if (($evolve_excerpt_thumbnail == "1")) { ?> <?php the_excerpt();?> <div class="read-more btn btn-right icon-arrow-right"> <a href="<?php the_permalink(); ?>"><?php _e('READ MORE', 'evolve' ); ?></a> </div> <?php } else { ?> <?php the_content( __('READ MORE »', 'evolve' ) ); ?> <?php wp_link_pages( array( 'before' => '<div id="page-links"><p>' . __( '<strong>Pages:</strong>', 'evolve' ), 'after' => '</p></div>' ) ); ?> <?php } ?> <!--END .entry-content .article--> <div class="clearfix"></div> </div> <!--BEGIN .entry-meta .entry-footer--> <div class="entry-meta entry-footer row"> <div class="col-md-6"> <?php if ( evolve_get_terms( 'cats' ) ) { ?> <div class="entry-categories"> <?php echo evolve_get_terms( 'cats' ); ?></div> <?php } ?> <?php if ( evolve_get_terms( 'tags' ) ) { ?> <div class="entry-tags"> <?php echo evolve_get_terms( 'tags' ); ?></div> <?php } ?> <!--END .entry-meta .entry-footer--> </div> <div class="col-md-6"> <?php if (($evolve_share_this == "single_archive") || ($evolve_share_this == "all")) { evolve_sharethis(); } else { ?> <div class="margin-40"></div> <?php }?> </div> </div> <!--END .hentry--> </div> <?php comments_template(); ?> <?php endwhile; ?> <?php if (($evolve_nav_links == "") || ($evolve_nav_links == "after") || ($evolve_nav_links == "both")) { ?> <?php get_template_part( 'navigation', 'index' ); ?> <?php } else {?> <?php } ?> <?php else : ?> <?php if (is_search()) { ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Your search for', 'evolve' ); ?> "<?php echo the_search_query(); ?>" <?php _e( 'did not match any entries', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <br /> <p><?php _e( 'Suggestions:', 'evolve' ); ?></p> <ul> <li><?php _e( 'Make sure all words are spelled correctly.', 'evolve' ); ?></li> <li><?php _e( 'Try different keywords.', 'evolve' ); ?></li> <li><?php _e( 'Try more general keywords.', 'evolve' ); ?></li> </ul> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php } else { ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Not Found', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'evolve' ); ?></p> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php } ?> <?php endif; ?> <?php } ?> <!-- 1 column end --> <!-- home/date/category/tag/search/author end --> <?php } elseif (is_page()) { ?> <?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <!--BEGIN .hentry--> <div id="post-<?php the_ID(); ?>" class="<?php semantic_entries(); ?>"> <?php if(get_post_meta($post->ID, 'evolve_page_title', true) == 'no'): else: ?> <h1 class="entry-title"><?php if ( get_the_title() ){ the_title(); } ?></h1> <?php endif; ?> <?php if ( current_user_can( 'edit_post', $post->ID ) ): ?> <?php edit_post_link( __( 'EDIT', 'evolve' ), '<span class="edit-page">', '</span>' ); ?> <?php endif; ?> <!--BEGIN .entry-content .article--> <div class="entry-content article"> <?php the_content( __('READ MORE »', 'evolve' ) ); ?> <!--END .entry-content .article--> <div class="clearfix"></div> </div> <!-- Auto Discovery Trackbacks <?php trackback_rdf(); ?> --> <!--END .hentry--> </div> <?php if( $evolve_share_this == 'all' ) evolve_sharethis(); ?> <?php if ( 'page' !== get_option('show_on_front') ) comments_template( '', true ); ?> <?php endwhile; endif; ?> <?php } elseif (is_404()) { ?> <!--BEGIN #post-0--> <div id="post-0" class="<?php semantic_entries(); ?>"> <h1 class="entry-title"><?php _e( 'Not Found', 'evolve' ); ?></h1> <!--BEGIN .entry-content--> <div class="entry-content"> <p><?php _e( 'Sorry, but you are looking for something that isn\'t here.', 'evolve' ); ?></p> <!--END .entry-content--> </div> <!--END #post-0--> </div> <?php } ?> <!--END #primary .hfeed--> </div> <?php if (($evolve_layout == "1c")) { ?> <?php } else { ?> <?php if((is_page() || is_single()) && get_post_meta($post->ID, 'evolve_full_width', true) == 'yes'): else: ?> <?php get_sidebar(); ?> <?php endif; ?> <?php } ?> <?php get_footer(); ?>
Hi there,
In order to achieve such required output you have to put a java-script code into your functions.php file for which you must should have installed child theme and if you don’t please install first then follow the remaining procedure.
Go to your functions.php file and insert the code below out there:
<?php // Don't Copy This Line add_action( 'wp_footer', 'custom_page_script', 10 ); function custom_page_script(){ ?> <script> jQuery(document).ready(function($) { var logoAnchor = $('#logo-image').closest('a'); var logoHref = logoAnchor.attr('href'); logoAnchor.attr('href', logoHref + '?page_id=170'); }); </script> <?php }
Hope this helps!
Thanks.
Could you please provide the URL of your website which will make it a much easier to assist you. However provide more clarification in concern of what do you need to link with the some other website.
https://www.meizu-mx5.com/summermobile – I provided the url in a earlier post along with as much clarification as I could.
emraneranx – will try this shortly and let you know how it goes – I do have a child theme
Sue
emraneranx – just adding functions.php to my child theme “breaks” the site. Nothing loads at all – not the admin and not the site. What the heck!?! This is the evolve theme – don’t know if you know anything about that theme. I contact them on their site with the question and they were not helpful at all.
Sue
Hi there,
Would you mind confirming us that you’ve not added this <?php before your code. We are apologized for the inconvenience please make sure that the code is this:
add_action( 'wp_footer', 'custom_page_script', 10 ); function custom_page_script(){ ?> <script> jQuery(document).ready(function($) { var logoAnchor = $('#logo-image').closest('a'); var logoHref = logoAnchor.attr('href'); logoAnchor.attr('href', logoHref + '?page_id=170'); }); </script> <?php }
Thanks.
No apology needed – I appreciate your help!
Even before I add this code – if I copy the functions.php that is in my theme folder and put a copy of it into my child theme – it breaks the site completely. Everything disappears – I don’t even get a chance to add your wonderful code. Am I incorrect in thinking if I have a functioning child theme – the style.css behaves correctly – that all I need to do is copy other files into it and then adjust them? So I should only need to copy the functions.php from the theme folder into the child folder – correct?
Hi there,
Would you send the complete code of your functions.php so I’ll proceed from here and let you out from this staging problem.
Thanks.
<?php $evolve_themename = "evolve"; define( 'THEMENAME', $evolve_themename ); if ( get_stylesheet_directory() == get_template_directory() ) { define('EVOLVE_URL', get_template_directory() . '/library/functions/'); define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/'); } else { define('EVOLVE_URL', get_template_directory() . '/library/functions/'); define('EVOLVE_DIRECTORY', get_template_directory_uri() . '/library/functions/'); } get_template_part( 'library/functions/options-framework' ); get_template_part( 'library/functions/basic-functions' ); get_template_part( 'library/functions/options' ); ?>
Hi there,
Would you please let us know that if the above functions.php file is your child theme’s functions.php or the actual evolve theme’s. I require your child theme’s functions.php full code. Please confirm us if its your child theme’s or if its not then please link your child theme’s functions.php.
Thanks.
- The topic ‘Custom hyperlink for header logo in evolve’ is closed to new replies.