Skip to content
This repository was archived by the owner on May 18, 2025. It is now read-only.
This repository was archived by the owner on May 18, 2025. It is now read-only.

Can't get the profile url to the template #62

Description

@angelofm

Could not find a solution to get the "team profile url" to use on a template.
Somewhere (cannot find where right now) In the documentation we have something similar to the code below, I wanted to add a Read Profile button on my template but did not have access to the $post->url field

add_filter( 'woothemes_our_team_item_template', 'new_team_member_template' );
function new_team_member_template( $tpl ) {
    $tpl = '<li itemscope itemtype="http://schema.org/Person" class="%%CLASS%%">%%TITLE%% <a href="%%PROFILE_URL%%">Read profile</a> </li>';
    return $tpl;
}

So I added this
$template = str_replace( '%%PROFILE_URL%%', esc_url( $post->url ), $template);

Great work in this plugin I love it (y)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions