Skip Navigation

[Resolved] Split: Views within a VIew – cred-relationship-form-link do not display correct post title

This thread is resolved. Here is a description of the problem and solution.

Problem:
cred-relationship-form-link do not display correct post title

Solution:
To display the correct post title with the [cred-relationship-form-link] shortcode, as a workaround, you can use the custom shortcode I shared which returns the correct post title.

You can find the proposed solution in this case with the following reply:
=> https://toolset.com/forums/topic/split-views-within-a-view-cred-relationship-form-link-do-not-display-correct-post-title/#post-1786051

Relevant Documentation:

This support ticket is created 3 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by aprilB 3 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#1786009

Thank you very much. This is great. It took me a bit to process and understand but I think I got it.

I have a few questiona for you now.:

Q3: also, i was wondering something..if you look at the loop of the view you created:

[wpv-post-title] - [wpv-post-id] - [cred-relationship-form-link form='add-products-to-showrooms-form' child_item='[wpv-post-id item="$current_page"]' content_template_slug='editing-mode-template-for-showrooms-and-products-relationships'] Add to [wpv-post-title] [/cred-relationship-form-link]

I would like it to say "Add to <SHOWROOM>" but right now it is showing "Add to <Product>" . I am not sure I understand how to reference the showroom name within the cred tag.

#1786051

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

There is a issue when you add a relationship link caption as: Add to [wpv-post-title]

I've reported that issue to our next level support but fortunately I've workaround to offer you.

I've added the following shortcode to "Custom Code" section offered by Toolset:

function func_show_post_title($atts) {
    
  return get_the_title($atts['post_id']);
}
add_shortcode('show-post-title', 'func_show_post_title');

And within your view i've called the above shortcode as:
=> hidden link

[cred-relationship-form-link form='add-products-to-showrooms-form' child_item='[wpv-post-id item="$current_page"]' content_template_slug='editing-mode-template-for-showrooms-and-products-relationships'] Add to [show-post-title post_id='[wpv-post-id]'] [/cred-relationship-form-link]  

I can see its working as expected. Can you please confirm.

#1790527

My issue is resolved now. Thank you!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.