I have this content template code
<!-- Begin Template for Attorneys -->
<h1 class="entry-title">[wpv-if evaluate="'[wpv-post-id id="$parent"]' != '[wpv-post-id]'"][wpv-post-title id="$parent"] - [/wpv-if]<span>[wpv-post-title]</span></h1>
[wpv-conditional if="( NOT(empty($(_thumbnail_id))) )"]
<div class="featured-image tablet-right">
[wpv-post-featured-image size="full"]
</div>
[/wpv-conditional]
<div class="entry-body">
[wpv-view name="view-for-award-badges"]
[wpv-post-body view_template="none"]
</div>
<div class="practice-areas tablet-right">
<h2>Practice Areas</h2>
[menu name="practice"]
</div>
<!-- End Template for Attorneys -->
It generates pages like the screenshot.
When the page is a child page, I want the Attorney name to be a link back to the parent page.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
Thank you for contacting our support forum.
So you want to do is to make your Page title clickable to the parent?
Is the Parent the same custom post type or is it in another CPT?
Please let me know.
Thanks,
Shane
Not the whole page title, just the attorney's name, which is the title of the parent page.
They are all the same post type. See screenshot showing all the pages and relationship for this post type. I have circled all the parent pages.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
Then you should be able to use this.
<a href="[wpv-post-link id='$parent' output='raw']">[wpv-post-title]</a>
Please let me know if this helps.
Thanks,
Shane
Looks like that would link the page title ("Practice Areas" in my example). I want to link the parent page title which comes before the hyphen. See new screenshot of the line of template code that generates the H1 heading.
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hello,
In this case you would need to do this.
[wpv-post-link id="$parent"]
Please let me know if this helps.
Thanks,
I'm confused. Where would that go in my template code?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
You will replace
[wpv-post-title id="$parent"] -
with
[wpv-post-link id="$parent"] -