Modify a Template Tag (3 posts)

  1. hughshields
    Posted 2 years ago #

    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.

  2. JarretC
    Posted 2 years ago #

    Did you try using just home_url(); ?

  3. hughshields
    Posted 2 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Topic