Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

hyperlink on php

I'm working on a WordPress template and need to add a hyperlink to the cartoon bubble at the top of the page. The bubble, as far as I can tell, is php. Where do I insert the href?

<h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>

The href should point to www.ojaivalleynews.com

The blog url is www.ovnblog.com if you want a visual on the bubble. I've used firebug to ispect, but alas I don't know enough about php to make sense of it.

Update

I missed the second line of code regarding the above question, and based off of the suggestions here, have made corrections to this line and it works.

<h1><a href="<?php bloginfo('url'); ?>/"><?php bloginfo('name'); ?></a></h1>
<div id="bubble"><p><a href="http://www.ojaivalleynews.com/" target="_blank"><?php bloginfo('description'); ?></p></div> 
like image 922
rashneon Avatar asked Sep 19 '26 06:09

rashneon


2 Answers

just replace the

<?php bloginfo('url'); ?>/

with

http://www.ojaivalleynews.com
like image 74
Scott Evernden Avatar answered Sep 20 '26 18:09

Scott Evernden


rashneon, look for the following HTML (search header.php for 'bubble')

<div id="bubble">
  <p>Click for OVN Homepage!</p>
</div>

replace that with

<div id="bubble">
  <p><a href="http://www.ojaivalleynews.com/">Click for OVN Homepage!</a></p>
</div>

@Endlessdeath - no, delightfully WordPress mixes a bunch of functions which print with a bunch of functions which return values. So yes, it really is supposed to be <?php bloginfo('url'); ?> - see the default theme file

like image 23
Chris Burgess Avatar answered Sep 20 '26 18:09

Chris Burgess



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!