Jump to content


Photo
- - - - -

Make header jpeg link to email instead of root


  • Please log in to reply
6 replies to this topic

#1 freshlydesigned

freshlydesigned

    Super Member

  • Members

  • 138 posts
  • Country: Country Flag

Posted 31 October 2011 - 10:41 AM

Hi there, I have a header jpeg that includes an email address in the image (I know, ugly but heyho, can't figure out hooks) and I want the link to go to a mailto: link instead of back to the homepage. Is this possible and where can I do it? Thanks www.boconnoc.com

#2 Danny

Danny

    Is Awesome!

  • Moderators
  • 16952 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 31 October 2011 - 12:09 PM

Hi,

You could try adding this to your chils themes functions.php file and then edit your header image to only include your name/logo.

Add the below code to your functions.php file located in "/wp-content/themes/platformbase/", add this code to the bottom of the file.

 
	// ADDS CONTACT DETAILS TO BRANDING ------- //
	add_action('pagelines_branding_icons_end', 'boconnoc_mail');
	
	function boconnoc_mail(){
	
	?>
	<div class="boconnoc_mail">Telephone: 01208 872507
	Email: <a title="info@boconnoc.com" href="mailto:info@boconnoc.com">info@boconnoc.com</a>
	</div>
	<?php }

Add this custom css to your Platform Settings --> Custom Code --> CSS Rules:

 
	.boconnoc_mail {
		bottom: -10px;
		font-size: 85%;
		line-height: 1.5em;
		position: absolute;
		right: 1px;
		text-align: right;
		width: 250px;
	}

Give that try and let me know if it works.

#3 freshlydesigned

freshlydesigned

    Super Member

  • Members

  • 138 posts
  • Country: Country Flag

Posted 31 October 2011 - 01:22 PM

Danny I salute you!! Excellent, thanks a million man.

#4 Danny

Danny

    Is Awesome!

  • Moderators
  • 16952 posts
  • LocationManchester, UK
  • Country: Country Flag

Posted 31 October 2011 - 01:31 PM

No problem, happy to help!

I actually checked your site to see the end result and I noticed that the contact number wasnt correctly aligned with the email address. The reason for this is you have set the text aligned to right. Now you if you want to do a little test, I think you may prefer the out come.

Replace the CSS I gave you above with this below:

 
	.boconnoc_mail {
		bottom: 3px;
		font-size: 85%;
		line-height: 1.5em;
		padding-right: 70px;
		position: absolute;
		right: 1px;
		text-align: left;
		width: 150px;
	}

Also the site itself, looks amazing.

#5 freshlydesigned

freshlydesigned

    Super Member

  • Members

  • 138 posts
  • Country: Country Flag

Posted 31 October 2011 - 01:50 PM

Actually I like the fact it aligns right with the fact the social icons are there, but thanks anyway!

#6 freshlydesigned

freshlydesigned

    Super Member

  • Members

  • 138 posts
  • Country: Country Flag

Posted 01 November 2011 - 10:01 PM

Hi Danny, Just realised I have a bot of a problem as now the social media icons on the right are not clickable or getting to their hover state, can you help? thanks jamie

#7 freshlydesigned

freshlydesigned

    Super Member

  • Members

  • 138 posts
  • Country: Country Flag

Posted 01 November 2011 - 10:57 PM

it's ok I've fixed this using margin in the CSS instead of padding. Cheers :-)