Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
angelofm opened this issue Mar 19, 2015 · 0 comments
Open

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

angelofm opened this issue Mar 19, 2015 · 0 comments

Comments

@angelofm
Copy link

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)

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

No branches or pull requests

2 participants