WordPress.org

Support

Support » How-To and Troubleshooting » Modify a Template Tag

Modify a Template Tag

  • hughshields

    @hughshields

    I am trying to modify a template tag to redirect the user authentication link to my Activate page. The current custom registration has the link going to my home page. Here is the existing code:

    $url = is_multisite() ? get_blogaddress_by_id( (int) $blog_id) : home_url ('', 'http');

    I looked up the home_url template tag in the WP Codex and it looks like this:

    <?php home_url( $path, $scheme ); ?>

    The $path parameters are: (string) (optional) Path relative to the home URL. Default: None

    I believe I want to add the relative page link as the $path but I am getting the syntax wrong or something. I tried

    home_url ('activate', 'http');

    along with a few other combinations but no luck.

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

    @jarretc

    Did you try using just home_url(); ?

    hughshields

    @hughshields

    The problem ends up being that my theme uses a “front page template” to get the header, therefore when my verification email link gets the home_url and tries to get the header it ends up brining in the entire home page image (header, contnet, footer).
    So I was trying to redirect the home_url() to a different page that has a normal header such as my Activate page.
    Another option is to try and adjust my theme home page template which I have a support ticket in for now.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Modify a Template Tag’ is closed to new replies.
Skip to toolbar