WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Button link to "currentpage/" (2 posts)

  1. ngoodman
    Member
    Posted 3 years ago #

    On my site http://shuster.congressadvisors.org the big red join button is the one im talking about.

    This theme is being used on multiple sister sites, so id like for the button to link to a different "join" page for each site.

    so the code would be something like href="current-site/join"

    so if i was on the http://moran.congressadvisors.org page it would take me to http://moran.congressadvisors.org/join when clicked.

    and if i was on http://shuster.congressadvisors.org page it would take me to http://shuster.congressadvisors.org/join when clicked.

    is this even possible?

  2. ngoodman
    Member
    Posted 3 years ago #

    found the answer to my own question:

    href="<?php echo home_url( '/join' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"

    not sure if its the "right" way but it worked!!

Topic Closed

This topic has been closed to new replies.

About this Topic