• Resolved squareink

    (@squareink)


    Hello

    I have entered an e-mail address as my “Blog Description”. How can I make this into a mailto: hyperlink?

    <div id="blog-description"><?php bloginfo('description') ?></div>

    As I am only familiar with html and not php I am unsure where/ how to add code for it to work.

    Any help would be appreciated!

    Many thanks

Viewing 9 replies - 1 through 9 (of 9 total)
  • So the description is also the email address?…

    If that’s the case then…

    <div id="blog-description"><a href="mailto:<?php bloginfo('description') ?"><?php bloginfo('description') ?></a></div>

    Thread Starter squareink

    (@squareink)

    it didn’t work. I got a Parse error: syntax error, unexpected T_STRING

    and yes, I’ve entered only an e-mail address.

    It is the tag line it is linking to if that makes it more clear. And I am also using the autofocus theme.

    If people send email to “Blog Description” it will just float round in space?

    Why not send it to your email address?..

    <div id="blog-description"><a href="mailto:YOU@DOMAIN.com</a></div>

    Sorry try…

    <div id="blog-description"><a href="mailto:<?php get_bloginfo('description') ?"><?php bloginfo('description') ?></a></div>
    or
    <div id="blog-description"><a href="mailto:<?php echo get_bloginfo('description') ?"><?php bloginfo('description') ?></a></div>

    My mistake, should of used the correct function first time (get_bloginfo, instead of bloginfo for the link part).

    tbb (guy above), the description is in the format of xxx@xxx.com

    If he wanted to hardcode it i’m sure he’d have never asked..

    Thread Starter squareink

    (@squareink)

    If someone does know what I did wrong or another way of doing it, then please let me know but for now I am just going to replace the php function with manually written code within that div instead.

    See my previous reply..

    Thread Starter squareink

    (@squareink)

    oops sorry guys, didn’t see the reply before I posted my last comment! I’ll try to change the code and see if it works.

    Thread Starter squareink

    (@squareink)

    didn’t work either. I’ll just go with the hard coded way instead. Wont be much changing of themes/ updates etc on this website anyway.

    Thanks for trying though!

    Again my mistake giving you incorrect code…

    Use this and it will work (i tested it this time)… 😉
    <div id="blog-description"><a href="mailto:<?php echo get_bloginfo('description') ?>"><?php bloginfo('description') ?></a></div>

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Changing the blog description in the header to be e-mail hyperlink’ is closed to new replies.