WordPress.org

Support

Support » Themes and Templates » Ryu » Email contact button: using /contact instead of mailto ?

Email contact button: using /contact instead of mailto ?

  • lstelie

    @lstelie

    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

Viewing 2 replies - 1 through 2 (of 2 total)
  • lstelie

    @lstelie

    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

    Moderator Kathryn

    @zoonini

    Automattic Happiness Engineer

    Thanks for sharing your solution!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Email contact button: using /contact instead of mailto ?’ is closed to new replies.
Skip to toolbar