WordPress.org

Ready to get started?Download WordPress

Forums

Ryu
Email contact button: using /contact instead of mailto ? (3 posts)

  1. lstelie
    Member
    Posted 7 months ago #

    Hello,

    I use this wonderful theme at my personal blog at http://luc.saint-elie.com

    The contact button seems devoted to a mailto: link. I would like instead to use an url http://luc.saint-elie.com/contact that points to the standard WP contact page with a form (more convenient than a mail for me)

    Is there a solution for that ?

    Thanks in advance

    Luc

  2. lstelie
    Member
    Posted 7 months ago #

    Hello,

    In case it could help.. a dirty solution
    I have a child theme with a specific header.php

    In header.php search for

    <?php if ( is_email( $email_link ) ) : ?>

    And delete this condition , don't forget to delete the closing

    <?php endif; ?>

    Then hardcode the url

    A more elegant solution would be something I'm unable to code cleanly and that would say :

    <?php if ( is_email( $email_link ) ) : ?>
    => link to mailto
    <?php else ( is_url( $url_link ) ) : ?>
    => link to url
    Luc

  3. Thanks for sharing your solution!

Reply

You must log in to post.

About this Theme

About this Topic